[TxMt] (no subject)

Nicholas Cole nicholas.cole at gmail.com
Sun Jan 29 17:20:14 UTC 2006


(sorry if this pops up multiple times - gmail doesn't seem to be  
working properly)

I've recently started using Textmate and the Latex bundle.  I found  
that I wanted to extend the functionality in various ways, including  
by adding definitions to the Lanuage file to allow me to highlight  
footnotes and emphasised text.  Some of the code I wanted to add is:

{	name = 'meta.footnote.latex';
			begin = '(\\(footnote|noteToSelf)\{)';
			end = '(\})';
			captures = { 1 = { name = 'keyword.footnote.latex'; }; };
			patterns = ( { include = '$self'; } );
			contentName = 'variable.parameter.footnote.latex';
		},
		{	name = 'meta.emph.latex';
			begin = '(\\emph\{)';
			end = '(\})';
			captures = { 1 = { name = 'keyword.emph.latex'; }; };
			patterns = ( { include = '$self'; } );
			contentName = 'variable.parameter.emph.latex';
		},

I've added that code to a copy of the Language definition.  It seems  
to work fine (there are probably errors, since I'm a newbie) but it  
occurs to me that there may be a better way to do it.  As it stands,  
if the Latex bundle is updated in the next release, I'll still be  
using the older language definition.  Is there any way I could have  
written my snippit to avoid that problem?

Best wishes,

Nicholas



More information about the textmate mailing list