On 5. Nov 2004, at 10:55, Ian White wrote:
It strikes me that having a TM_ variable that gives
the first line of
each enclosing code blocks would be extremely useful for looking up
the correct set of symbols. Any chance of this? Or suggestions as to
some other way of doing it?
If you can give me a language neutral definition of “the first line of
each enclosing code block” I may consider it ;)
But you have TM_FILEPATH and TM_LINE_NUMBER, so you should be able to
find this stuff yourself -- although come to think of it, this requires
the file to be saved. You could set the input to the entire document to
get the actual file instead.
Another option would be for me to do minimal AppleScript support
(something which I'm only postponing because I don't think it's that
important ATM).
Also, regarding commands, it would be nice if commands
could be
'chained', using the output of one as the input of the other. In
conjunction with this, if there was a new output type 'list' (like a
snippet popup) then the user's selection could then be fed into a new
command. That way, code-completion could be interactive.
Yes, I do see the benefit here. I'll think some more about how to best
achieve the inter-activeness you seek.
One last idea, could there be (is there?) some way of
storing script
variables across command executions?
No, two problems with this is 1) how to tell TM what to keep and 2)
which scope should the variables have (file, project, session, global).
What I could do is introduce TM_FILE_GUID, TM_PROJECT_GUID, and
TM_SESSION_GUID. These could then be used as prefix when storing stuff
in /tmp and would serve as scope-indicators.