Sublime Forum

Color Scheme Syntax

#1

Is there any reference anywhere as to what scopes SublimeText2 will respond to when making your own theme? It’s driving me nuts trying to stumble across valid syntax by looking at other peoples schemes or by trial and error.

0 Likes

#2

You could just read a little on how textmate themes are working:

manual.macromates.com/en/themes
blog.macromates.com/2006/creating-themes/

Also, ctrl+alt+shift+p keyboard might be helpful: (http://img.iamntz.com/jing/2013-01-09_08h53_13.png)

0 Likes

#3

Thanks,

I’ll take a look at those. I have tried installing plugins like ScopeHunter etc. But for things like bracket matching or built in high level scope names, they don’t seem to report those, I get those crazy long scopes that are specific to a language. Would be nice if Jon could throw together some documentation on what high level scopes he has implemented in the engine.

  • Matt
0 Likes

#4

The scopes are determined by the syntax. You may find it helpful to have a look at the .tmLanguage files of any languages you are working with.

Also, in case you haven’t worked it out yet, themes cascade – like CSS. So make sure you cover all the basic categories (string, keyword, variable, constant, etc.) as defined in the TextMate docs: manual.macromates.com/en/languag … onventions

Hope this helps,
Alex

0 Likes