Something like this is already possible, at least if you’re a licensed user and use one of the recent development builds; if not then you will have to wait for the next stable build to land.
The new dev builds introduced a new color scheme format called sublime-color-scheme
that are a JSON version of tmTheme
format that used to be used. One of the features that this brings is the ability to create partial overrides for color schemes in the same way as is currently possible for other Sublime resources.
For example, what you outlined above can be achieved by creating a file with the same name as your color scheme in your User
package with contents like the following (for me, that’s Packages/User/Monokai.sublime-color.scheme
):
{
"rules":
[
{
"name": "Tag attribute",
"scope": "entity.other.attribute-name",
"foreground": "var(yellow2)",
"font_style": "italic"
},
]
}
This is almost exactly what you outlined above, only in a different file. Arguably this is more “Sublime-like” than doing the same thing in settings as you outlined above since other Sublime resources can be augmented in the same way. Note also that the color_scheme
setting isn’t global and can be changed per-tab, so at the very least if this was done in one file it would need to have keys to say what color scheme it applies to since there’s no guarantee that the colors chosen would make sense otherwise.
An example of it in operation is the following modification being made to the Monokai.sublime-color-scheme
, except that the italic
style is applied both times because I forgot and just realized it now):