[TxMt] Re: textmate Digest, Vol 11, Issue 28

Daniel Royer daniel.royer+textmate at gmail.com
Sat Apr 18 14:01:25 UTC 2009


Thanks, Allan.  Worked like a charm!

Regards,

Daniel Royer

On Thu, Apr 16, 2009 at 8:00 AM, Allan Odgaard wrote:
>> [...]
>> I notice in the status bar at the bottom of the editor window (to the
>> right of the Tab Size), there is a "Symbol Popup" menu.  So it seems
>> like the information I need is available [...]
>
> It is not, but oft requested. The symbol in the status bar is not
> necessarily the ?current function?, it is just the first thing matched
> via some scope selector (optionally passed through some regexps) above
> the caret.
>
> What you can do is make a command that takes stdin as input and then
> do something like: SYMBOL=$(head -n$TM_LINE_NUMBER|grep ?function
> prototype regexp?|tail -n1). Have the command ?insert as snippet? and
> construct the snippet from the previous.
>
> I am adding an ?expose current symbol? to the to-do, since it seems a
> lot want this and don?t care that it might not be 100% correct (and
> whatever hand-roled solution they make is probably even less
> correct ;) ).



More information about the textmate mailing list