Installation
Put change_tab_color_scheme.py
, change_window_color_scheme.py
, and window_color_scheme_event_listener.py
in the folder that opens up when you select
Preferences > Browse Packages...
Now you have a command called change_tab_color_scheme
that you can access from the command window.
You can set a key binding by going to
Preferences > Key Bindings
I personally like the "ctrl+k", "ctrl+c" sequence.
In the {blah}.sublime-keymap
file, add the key binding like this...
[
{
"keys": ["ctrl+k", "ctrl+c"],
"command": "change_tab_color_scheme"
}
]
Now you can quickly set the color scheme to whatever you want in each tab.
These color changes are not persisistent.
zitot:
- This handles windows too. The original author is below, but my version uses an eventlistener, so if you open a new tab, it will propagate the window color scheme. Additionally, new windows will use the default color scheme, and you can have multiple windows with different color schemes active at the same time.x
For changing the window color scheme, I like C-k-c-k
[
{
"keys": ["ctrl+k", "ctrl+c", "ctrl+k"],
"command": "change_window_color_scheme"
}
]
Original Author: https://stackoverflow.com/a/26317770/5039075
Issues
-
open a folder using File->Open folder.., then click an unopened file from the sidebar to opens a new tab whose name is in italics. Do not make changes to the file, or you lose italics. Run the change_tab_color_scheme command on that tab. Click another file to replace the current file in the tab. You lose the color. I can't figure out how to propagate the previous italics tab color to the new italics tab. (because the buffer id is different, the sheet id is different, and the view id is different). I don't yet understand what is so special about italics tabs. It's arguable that this is the expected behavior, but if you go back to the original file you chagned the color on, it's still gone - whether the color of a tab should propagate to a new file is one thing, but the first file loses its color, too.
-
When you press escape on the quick panel to cancel making a selection, the selected scheme is still applied to the window except for the active_view. The solution to this involves saving the state of all views and associated color schemes and iterating through those and applying each (as we may have tab color scheme applied to certain tabs)