[TxMt] Method/function list?
kmcmillan at leapfrogonline.com
Tue Nov 30 16:47:49 UTC 2004
On Nov 29, 2004, at 7:07 PM, Eric Hsu wrote:
>> I am hoping I¼m just missing something obvious... Is there some kind
>> 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
More information about the textmate