[SVN] Revision 1255 (Latex)

Allan Odgaard allan at macromates.com
Sun Jun 26 17:50:41 UTC 2005


On 25/06/2005, at 15.07, Brad Miller wrote:

> For some reason if you decide to use \verbbfoobarb where the 'b'  
> character or any other alphanumeric, the tex.keyword.general rule  
> takes over.

TextMate always uses the longest match. Unfortunately for begin/end  
rules the length of that match (used to pick the longest) is that of  
the begin pattern only.

In this case though, I'd think you can make a normal match instead of  
using begin/end. In this case the match would then be of the same  
length as the general keyword rule, so the tie is decided by which  
rule appears first in the grammar.

Another solution is to use negative look-ahead for the fall-back rule  
(but less appealing of course, since it's not as “modular”).





More information about the textmate-dev mailing list