[TxMt] More issues with LaTeX syntax highlighting

Robin Houston robin.houston at gmail.com
Wed Apr 25 17:30:35 UTC 2007


On 4/25/07, Hendrik Fuß <hendrik.fuss at gmail.com> wrote:
>
> Okay, I am unable to test this at the moment, but: In the expression
> {$foo} doesn't TextMate take the } as the closing brace for $? That
> would mean that there is still one unmatched opening brace {.


I see what you mean. Yes, that is a problem: see below for a fix.
The reason you confused me is that this doesn't affect "Select
Enclosing Brackets", which I don't think uses the scope information
at all. Indeed, "Select Enclosing Brackets" works perfectly as expected
in all the cases I've tested, including the one you just posted.

You *can* see the problem by typing

  {$foo}

positioning the cursor after it, and pressing control-shift-P. This shows
that
the brace group is still in effect. The fix is to use a lookahead:

        …
        {    name = 'string.other.math.tex';
            begin = '\$';
            end = '(?=\})|\$';
        …

Thanks for pointing this out.

Robin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20070425/8741d35b/attachment.html>


More information about the textmate mailing list