[SVN] Language Definition Bug/Question

Brad Miller bmiller at luther.edu
Sat Apr 23 14:35:54 UTC 2005


Allan,

I went to fix the problem we were talking about with lstlisting, so I 
added to the begin pattern to optionally match a left bracket, followed 
by some stuff, followed by a right bracket  The pattern below correctly 
matches the beginning of a lstlisting now with or without the bracket.

         {
             begin = "(\\\\begin\\{)lstlisting(\\})(\\[(.*)\\])?";
             end = "(\\\\end\\{)lstlisting(\\})";
             captures = {
               1 = { name = "keyword.function.environment"; };
               2 = { name = "keyword.function.environment"; };
               //3 = { name = "function-argument.latex.optional"; };
               3 = { name = "keyword.function.environment"; };
               4 = { name = "keyword.function.environment"; };
             };
             patterns = ({ include = "Python"; });
         },

However, If I uncomment the commented out line and fix up the numbering 
of the captures to be sequential from 1..5 TextMate hangs.  Am I doing 
something wrong with my captures or is it a nesting problem in with b6?

Brad

Brad Miller, PhD
Assistant Professor
Luther College
http://www.cs.luther.edu/~bmiller
jabber:  bnmnetp at jabber.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 1271 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate-dev/attachments/20050423/42368c71/attachment.bin>


More information about the textmate-dev mailing list