Skip to content →

Treat LaTeX command definitions as Textmate symbols

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 = '

Published in LaTeX


Leave a Reply

Your email address will not be published. Required fields are marked *