I wanted LaTeX newcommand/renewcommand definitions to show up in the Textmate symbol list, so I could use the Cmd-Shift-T shortcut to jump to them. To accomplish this, I first went to the “LaTeX Language” entry in the bundle editor, and added this block to the “patterns” section:
{ name = 'latex.definition'; match = '(\\)(newcommand|renewcommand)\{[^\}]+\}'; }
Then, I created a new LaTeX Preference with scope selector “latex.definition”, and contents:
{ showInSymbolList = 1; symbolTransformation = ' s/^\\(newcommand|renewcommand)\{\\(.+)\}/$2/;'; }
Comments