[TxMt] Method/function list?
dperetti at lachoseinteractive.com
Thu Dec 2 15:00:25 UTC 2004
That's very cool. I can't believe I overlooked that !!
I modified a little bit mine so I get lines starting with "function".
Additionally, "function" is removed from each line and the result is
grep -En "^[^\*/]*(function) [&a-zA-Z0-9_]+" | sort -fbt: +1
Format : $3
On 30 nov. 04, at 17:47, kumar mcmillan wrote:
> On Nov 29, 2004, at 7:07 PM, Eric Hsu wrote:
>>> I am hoping I¼m just missing something obvious... Is there some
>>> kind of
>>> list of functions/methods? I.e. Similar to BBEdit or SEE¼s popup
>> Here's my kludged version of it for Perl using TM commands, which
>> pops up a separate window listing all the subroutines (i.e. lines
>> that begin with 'sub ').
>> Make a command:
>> - before: Do Nothing
>> - Command: grep -n "^sub "
>> - Std In: Entire document
>> - Std out: Show in separate win
>> - Pattern: ^(\d+):(.*)$
>> [this parses out the grep output so we can identify the line part]
>> - Format: $2
>> - Line:1
>> This idea can be tweaked to fit the language of your choice. I think
>> you can pipe it cleverly through sort to get the subroutines
> wow! I love TM. Allan are you trying to make us into zealots?
> I didn't really understand the Line / Format boxes in the command
> dialog, thanks for posting this Eric. Here is a pattern for PHP files
> grep -En "^[^\*/]*(abstract|public|private|function|class|interface)
> it's still not ideal, but between F1, up/down arrows and the Esc key,
> hands don't have to leave the keyboard... great workaround.
> PS. is there documentation somewhere on how exactly "Format String",
> "File Register", "Line", and "Column" work together?
>> good luck, Eric
>> Eric Hsu, Assistant Professor of Mathematics
>> San Francisco State University
>> erichsu at math.sfsu.edu
>> textmate mailing list
>> textmate at lists.macromates.com
> textmate mailing list
> textmate at lists.macromates.com
More information about the textmate