Sublime Text Tip: Indicating Current and Edited Tabs

To colour the current tab green, and any tab of an edited file red, add the following to your theme file.

Theme files are located in the Color Scheme – Default/ directory, which is accessed from the menu Preferences | Browse Packages… — you need to make these changes for each theme that you’d like to change the tab colours for:

{
 "class": "tab_control", "attributes": ["selected", "file_medium_dark"],
 "tint_modifier": [0, 255, 0, 48],
 "layer2.texture": "Theme - Default/medium_dark_selected_tab_bg.png",
 "layer2.opacity": 0.7
},
{
 "class": "tab_control", "attributes": ["dirty", "file_medium_dark"],
 "tint_modifier": [255, 0, 0, 127],
 "layer2.texture": "Theme - Default/medium_dark_selected_tab_bg.png",
 "layer2.opacity": 0.7
},
{
 "class": "tab_control", "attributes": ["selected", "dirty", "file_medium_dark"],
 "tint_modifier": [255, 255, 0, 64],
 "layer2.texture": "Theme - Default/medium_dark_selected_tab_bg.png",
 "layer2.opacity": 0.7
},

These changes need to replace existing entries, or should at least be placed at the end of the file (correcting commas as necessary). On Linux, the file might be

/home/username/.config/sublime-text-3/Packages/User/Default.sublime-theme

or something similar.

(From Stack Overflow.)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: