Hey everyone!
I would like to be able to quickly switch back and forth between a light theme and a dark theme by pressing a keyboard shortcut.
I tried using the Multicommand plugin, in combination with the set_setting
command, to create two key bindings that I can use for that purpose.
However, I noticed it only affects the current window. After reading the Themes documentation, I noticed that:
The settings modified here are buffer specific settings: they override any settings placed in a settings file, but apply to the current file only.
Is there a way to persist the modified settings globally instead of modifying the local buffer settings?
For reference, these are the key bindings I’m using:
{
"keys": ["super+ctrl+l"],
"command": "multicommand",
"args": {
"commands": [
{
"command": "set_setting",
"args":
{
"setting": "color_scheme",
"value": "Packages/User/Color Highlighter/themes/Solarized Flat Light.tmTheme"
}
},
{
"command": "set_setting",
"args":
{
"setting": "theme",
"value": "Solarized Flat Light.sublime-theme"
}
},
]
}
},
{
"keys": ["super+ctrl+o"],
"command": "multicommand",
"args": {
"commands": [
{
"command": "set_setting",
"args":
{
"setting": "color_scheme",
"value": "Packages/Material Theme - Mod/Material-Theme-Darker.tmTheme"
}
},
{
"command": "set_setting",
"args":
{
"setting": "theme",
"value": "Material-Theme-Darker.sublime-theme"
}
}
]
}
}
Thanks!