Allow overrides to color schemes

Kirk Strauser 8 years ago updated by Stuart O'Brien 7 years ago 2

The ability to override color scheme settings ala CSS would be very convenient. I'd like a mechanism for "sub-schemes" that override only portions of the main, "active" color scheme.

For example, very few color schemes support Markdown and I don't like the looks most of those schemes in other syntaxes, like Python. I can fork my own version of schemes I otherwise like and patch in Markdown support, but then I'd have to maintain that fork. I could use the sub-scheme mechanism to create Markdown-specific overrides and add them to my syntax-specific settings like:

        "color_sub_schemes": ["Packages/My Subthemes/Blue Markdown links.subscheme"]

Those sub-schemes would "patch" whatever color scheme I'm currently using - say Monokai - with just a couple of setting overrides.

This could be a big help to people maintaining language support as they could include a couple of subschemes with their packages like "Mylanguage (bright).subscheme" and "Mylanguage (dark).subscheme" so that users could be quickly up-and-running with their usual, familiar color scheme.

This could also be an accessibility win for users who need a particular setting in place across all color schemes, but otherwise enjoy the wide variety of available ST2 schemes. They could add something like:

    "color_sub_schemes": [
        "Packages/Headings/Bold Headings.subscheme",
        "Packages/Headings/Inverse Italics.subscheme"

to their global settings so that they can use the same color schemes we all know and love but with convenient accomodations of their personal needs.

This would also be great for plugin developers.

They could use a custom theme file for overriding the changes that their plugins use. One such plugin that messes too much with the theme file (alpha, but still) is the ColorHighlighter plugin. It has to put in a unique entry into the theme file for each color code it finds. This ends up making the theme file look like a mess.

Yes, this would be very useful. currently I have to move all my custom colors to the new theme if I decide to change. stuff like Bracket Highlighting etc. Good idea suggested here :)