Sublime Forum

[ the same color as =

#1

I would like to have [ sign the same color as =
I am setting the color of = with keyword.operator
Is this possible? Maybe also ( and )
Maybe I cal somehow tell the Sublime to tret [ and ] as =
I am using sublime 3.126
Or I can adjusting syntax definition, how ?

0 Likes

#2

It depends what language you’re using.
If you’re using a language where the syntax is precise and gives a scope name to ‘[’ then you can just change the color in your Color theme file by adding a new rule.
The scope name can be found by pressing “ctrl+alt+shit+p” when your cursor is on a “[”.

If there is no more precise scope name than “source.c++” then you’ll have to modify the language syntax itself, that’s another story !

0 Likes

#3

Good trick, thank you. I tried all, but in every case it also colors words or something I do not want. I would like just symbols like . [ ) = . I am using java.

0 Likes