[SVN] Can't get begin-end pattern to work

Charilaos Skiadas skiadas at math.uchicago.edu
Mon Jun 6 08:08:28 UTC 2005

On Jun 6, 2005, at 1:40 AM, Allan Odgaard wrote:

> On Jun 6, 2005, at 2:35, Charilaos Skiadas wrote:
>> and I can't figure out what I've done wrong. I am using the following:
>>         {   name = "declaration.environment.latex";
>>             begin = "(\\\\begin\\{)(.*?)(\\})";
>>             end = "(\\\\end\\{)(.*?)(\\})";
> Your end pattern has an invisible character in front of “.*?”.

:-)  Man, I've been bit by this more than once. Very irritating. I 
should probably enable the "show invisible characters" option, though I 
am not sure if it works in the language editor.

>>                 4 = { name = "keyword.function.environment.latex"; };
>>                 5 = { name = 
>> "entity.parameter.function.variable.environment.latex"; };
>>                 6 = { name = "keyword.function.environment.latex"; };
> Both begin and end patterns enumerate captures starting from 1. So 
> these are unnecessary (if you need different naming of end captures, 
> you can use endCaptures).

nah, I just put those there in my attempts to make it work. I'll get 
rid of them.

So, I am guessing there is no way yet to tell TM to use the other 
patterns in the space between begin and end? I tried something stupid 
like " patterns = ( { include = "text.latex"; } ); ", and sure enough 
got a wonderful spinning beach ball and had to restart TM.
So if we want this functionality at this point, the only way would be 
to put all the possible patterns in there? That would result in a lot 
of duplicate code. Sorry, I've asked for this too many times already, I 
promise, this is the last time I mention it. :-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 1709 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate-dev/attachments/20050606/a892cc0d/attachment.bin>

More information about the textmate-dev mailing list