Sublime Forum

Guide to Color Semantics - Highlights

#1

Would it be possible to get a simple dict for each color scheme, something like: {color:scope}? I am not talking about editing a color scheme, I am just talking about a simple guide to what color means what scope. I would think this would be trivial to implement, since the developer of the scheme has to have something like it already when they coded it. If such a thing exists already, I haven’t been able to find it, but pointing me to it would be great. I am using the default Monokai, and mostly work in Python, but I think this would be useful to all, especially newer users.
I already looked here:
https://www.sublimetext.com/docs/3/scope_naming.html#color_schemes

Thanks

0 Likes

#2

What’s the real thing you are going to do? I feel like this is a XY problem.

I am just talking about a simple guide to what color means what scope.

They are done in ST reversely. I.e., what scope means what color.

0 Likes

#3

Ok, where do I find that?

0 Likes

#4
  • First, you can find the scope of the current cursor position by ctrl+alt+shift++p.
  • Then you can find the scope-to-color relationship in your color scheme, i.e., Packages/Color Scheme - Default/Monokai.sublime-color-scheme.
0 Likes

#5

Ok, very helpful. That is what I needed. Thanks.

0 Likes

#6

Plus, https://packagecontrol.io/packages/ScopeHunter can be a replacement for the ST’s built-in.

I have the following in my key binding.

    // plugin: Scope Hunter
    { "keys": ["ctrl+alt+shift+p"], "command": "get_selection_scope" },
0 Likes