IMO, syntax files are a bit of pain in the neck to edit, because they are in xml, but it must be said that they are pretty straightforward too.
This might work for your case:
- Code: Select all
Now you'd need to:
1) Insert this snippet into the <array> of <patterns> in your tmLanguage file.
2) Edit the scope selector with the appropriate information. To get an idea how it works, copy a selector from an element that stands out from the rest of the code (comments, error warnings, etc). Scope selectors determine how the text is styled (according to other rules you can define too) besides, well, the scope of the pattern (basically, how far it spans).
I'm writing all this off the top of my head, so YMMV, but this is the gist of it.
If you want to develop a new syntax file, you might want to try my GrammarDev package, which should let you write your syntax file in json and do the conversion into xml automatically.http://bitbucket.org/guillermooo/grammardev
Order matters, etc. Syntax files can be a little tricky in the beginning.
Check out the Macromates docs for more info!