Sublime Forum

User 'theme-wide' overrides (Preferences.sublime-theme)

#1

This has been touched on many times previously. However, I couldn’t find a specific request, so:

Could ST3 get a single file Preferences.sublime-theme that allows a user to define theme-wide overrides?

For example, whatever theme a user chooses they can still specify the ‘highlight’ key to be one value and the ‘highlightForeground’ to be another.

I know it’s possible to do overrides theme by theme (make another theme file in the user folder that has the same name as the current theme and includes the necessary changes) but it has a lot of friction if you change themes regularly.

Any possibility of this?

3 Likes

#2

I agree, there should be an easier way to change the settings. I made my own theme: http://screenpresso.com/=OENQb

…but it does share a good bit of pain to edit. Preferably, it would be good to have a menu that links to an XML file and do this visually, or for those who prefer to code it in, to edit the XML file.

0 Likes

#3

Just coming back to this subject in 2019. Has there been any movement?
Another use-case is comments in various languages. I like bright comments!

A theme-wide user setting/preference would allow a user to set a single #hex and #hexbg combo that could override any current theme.

This is something vscode allows currently like this:

"editor.tokenColorCustomizations": {
    "[Nord]": {
      "comments": "#ff9900",
    },
    "textMateRules": [
      {
        "scope": "punctuation.definition.comment",
        "settings": {
          "foreground": "#FF9900",
          "fontStyle": "bold"
        }
      }
    ]
  },
0 Likes

#4

per color scheme only, but IMO that makes most sense anyway:

0 Likes

#5

Well, as mentioned in OP, the same also works with themes (and always has, afaik). PakageDev provides a command for this as well.

If you end up modifying overridden themes a lot (for whatever reason), you may want to create theme derivatives instead that use the extends key and switch between those. See the DAneo theme for examples.

Also, you can now use variables in themes and override those.

0 Likes

#6

Appreciate the clarification. Still believe there are certain settings that it would be desirable to have a global override for.

Tweaking individual themes for things like caret colour and style and the aforementioned comment colours seems quite laborious.

1 Like

#7

I’d find it impossible to come up with a universal color for comments in various color schemes. Just starting with dark and light schemes will already be problematic. It should be in your best interest to pick a proper color for each color scheme individually.

1 Like