[SVN] LaTeX syntax coloring problem, new to b9 I think

Allan Odgaard allan at macromates.com
Thu May 19 05:54:07 UTC 2005


On May 19, 2005, at 7:41, Charilaos Skiadas wrote:

>       {   name = "declaration.function-with-arg.latex";
>             // first match “\foo{arg}”
>             begin = "\\\\[A-Za-z]\\w*(?=\\{)"; end = "(?<\\})";
>             captures = { 1 = { name = "keyword.function.with- 
> arg.latex.general"; }; };

You should keep the (...) around the first match, since the  
“captures” assign a name to capture #1.

>             patterns = (
>                 { begin = "\\{"; end="\\}"; },
>                 { match = "\\{[^{}\\n]*(?R)?[^{}\\n]*\\}"; name =  
> "entity.parameter.function.variable"; },
>                 { match = "[^{}\\n]+"; name =  
> "entity.parameter.function.variable"; }

The second and third rule here are probably causing problems.

> none of these worked. In fact, it seems that the first time this  
> was to be used, it captured everything. Any ideas?

I committed the proper construct.

What about \foo[something]{arg}? Is this also legal (and thus should  
be matched)?




More information about the textmate-dev mailing list