Since switching to TextMate, I rarely make any syntax mistake, but when I do, then it's because I write `\medksip' instead of `\medskip' for instance.
All unknown LaTeX commands in regular text are grayish (with a few notable exceptions such as \cite, \eqref and \ref for instance). I would like to make a list of `known' LaTeX commands (including the different skips, \noindent, etc.) and color them differently.
How would I do that?
With a little abuse, I've managed to color them red by adding them to the constant.character.latex list, but this is not really a clean solution …
Thanks a lot.
Max
Max,
You could write your own Latex grammar and import the "original one". Then you can have your own definitions like:
{ name = 'meta.package.acronym.latex'; begin = '(\(?:ac|gls|acimm)[sfl]?(fn)?{)'; end = '(})'; captures = { 1 = { name = 'support.function.package.acronym'; }; }; patterns = ( { name = 'support.function.package.acronym.acronym'; match = '[a-zA-Z,:0-9-äöüß]+'; } ); },
which you can then style and color as you like in your theme.
Dan
On Sep 6, 2006, at 8:55 AM, Daniel Käsmayr wrote:
Max,
You could write your own Latex grammar and import the "original one". Then you can have your own definitions like:
which you can then style and color as you like in your theme.
It would indeed be nice to have the built in LaTeX grammar recognize “standard commands”. It's really a question of someone assembling a list of such commands. Then I can easily add them to the grammar.
While we are on the topic of the LaTeX bundle, there is some discussion among the maintainers about the fact that braces in LaTeX are not marked the same way as similar constructs are marked in other languages. In most languages parentheses (the analog in a way to LaTeX braces) only get a scope of punctuation.something-or-other, and don't by default get any highlight, though they could be colored by a custom theme by targeting the appropriate scope. We are thinking of doing the same for braces in LaTeX, which means that they would not stand out as they do now unless you especially target their scope in your theme. The advantage of this new way is that it makes LaTeX look and feel a bit more like most other programming languages.
So please, share your thoughts on this matter.
Further, there have been a lot of changes in the LaTeX bundle from the repository, especially a complete rewrite of the help file. So those of you following the repository copy of the bundle, please let us know what you think of the new help, what is missing from it and so on.
Dan
Haris