[SVN] Questions while updating LaTeX.plist

Allan Odgaard allan at macromates.com
Fri Apr 22 02:07:06 UTC 2005


On Apr 22, 2005, at 3:43, Brad Miller wrote:

> That's a good start but, the pattern that I have below colors the 
> \textbf part and the braces like a function but also lets me color 
> style the argument as bold and black.  That was the part I was trying 
> to figure out how to match whats between the begin and end.

Ah, okay -- currently I lack some inspiration about how to do this 
nicely, but you can do:

    {  name = "stuff-inside";
       begin = "(\\\\textbf)\\{"; end = "\\}";
       captures = {
          1 = { name = "keywords.functions.latex.textbf"; };
       };
    },

Now you can target “stuff-inside”, this will be the entire thing, but 
since you've spelled out the “\textbf” as a capture, any style set on 
“keywords.functions” (or just “keywords”) will take precedence over 
styles set on “stuff-inside” (precedence is probably the wrong word -- 
it merges all the styles, but with the best match as winning, so if you 
set “stuff-inside” to blue background, and you do NOT set a background 
for “keywords.functions”, then “\textbf” will also have a blue 
background).




More information about the textmate-dev mailing list