Sublime Forum

Syntax Highlighting - dict to scope to theme

#1

Can anyone point to a document that describes how to get from say… the various tags in a ?.tmLanguage file to scopes to Themes. The TextMate manual hasn’t got me there and Sublime documentation doesn’t go that far. I have simple, simple parameter highlighting to do and would love to accomplish via tmLanguage and Sublime Themes. I have to work with Aastra Sip Phone configuration files and am hoping to get grammar highlighting so people looking or writing these files will quickly see if they’ve made a mistake.

Does anyone have a simple (roughly less than 50 lines) tmLanguage file where I can match any phrase (Hello World) and then see how it’s scoped so any Theme would apply a style to it.

Currently I’m looking through the HTML.tmLanguage file looking for something I recognize (what looks like the area that describes tags) and then find how the tmLanguage file assigns some kind of scope (not finding it) and then looking at my current Theme to see what color a tag should be. I also have an .html file open to confirm. I can find areas of the theme that assign this color but there does not seem to be any straight line between the HTML.tmLanguage parameters and the Theme.tmTheme parameters. Is there a decent tutorial on this? How about any known very simple tmLanguage files that would be easier for me to go from matched string in ?.tmLanguage to a Theme color?

Thank you!!!

0 Likes