Sublime Forum

Build 3103 - Syntax Color Changes - Scope changes?

#1

Ok so I get from all of the posted topics that Build 3103 has broken syntax coloring, but my question is this. How can we tell what an elements scope is? In ST3 you can push Ctrl+Shift+Alt+P, but that doesn’t help me like it used to to be able to set colors the way I want to in the theme file.

Is there a guide somewhere for these new changes? I would be extremely helpful as it has messed up a LOT of my JS colors that I spent a long time customizing before. It used to be similar to TextMate, but now it’s different, and I can fix my file anymore.

Or is there a master template .sublime-syntax file that we can use since the new build didn’t come with one… which would have been nice also. Also how about instructions on how to install the .sublime-syntax file?

This page doesn’t really do a good job on how to set up your own file or have a template or how to install a new theme or etc. etc. etc. Creating a tmTheme was easy compared to these directions which are very confusing.
https://www.sublimetext.com/docs/3/syntax.html

0 Likes

#2

It seems that you are confusing several things.

The syntax coloring is done in two parts. First a grammar assign names (scopes) to different part of the code. This was done with .tmLanguage file and is now done using the new format .sublime-syntax.

Secondly, a .tmTheme map the scopes to colors. This part hasn’t changed and you can still modify your theme like you used to.

The link you refer describe how to write a sublime -syntax and doesn’t concern user lambda. If you want to modify how some ‘word’ is highlighted use ‘ctrl+shift+alt+p’ to identify its ‘scope’ and add a rule for this scope inside your tmTheme with the desirable color.

1 Like

#3

I was actually able to finally figure it out from this post.

I needed the JavaScript.sublime-syntax file. Once I got that I was able to get back to business and fix things.

0 Likes