Sublime Text 2: color of edited file tab?

I can see that the Sublime Text theme (.config / sublime-text-2 / Packages / Theme - Default / Default.sublime-theme) can be edited to make the open tab more obvious.

For this I use

{ "class": "tab_control", "attributes": ["selected", "file_medium_dark"], "tint_modifier": [0, 255, 0, 32] /* ... */ }, 

making the tab green.

Is there a similar method for coloring the tab of an edited (unsaved) file / buffer?

Thank.

+47
sublimetext2 sublimetext
Jul 02 2018-12-12T00:
source share
3 answers

After a short hunt, along with Mikko’s suggestion, take a look at the change log:

In Settings - user opened from Preferences | Settings Preferences | Settings , adds to the line

 "highlight_modified_tabs": true, 

This will cause the tab text to be orange if there are unsaved changes to the file.

To change the color from orange, it was necessary to continue digging and experimenting a bit, and it turned out that editing the theme was one way to change the color from orange.

Theme files can be found in the Color Scheme - Default folder , accessible from the Preferences | Browse Packages... Preferences | Browse Packages... - you will have to make these changes for each theme for which you want to change the text color for:

 { "class": "tab_control", "attributes": ["selected", "file_medium_dark"], "tint_modifier": [0, 255, 0, 40], "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, 40], "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, 40], "layer2.texture": "Theme - Default/medium_dark_selected_tab_bg.png", "layer2.opacity": 0.7 }, 

It would be nice to control the behavior of the "selected" and "dirty" (= changed) separately. It may be possible with layers, but I don’t understand them well enough yet.

Addenda

(1) The above applies to dark topics. For a light theme, omit "file_medium_dark" from the attributes.

(2) The same changes appear in Sublime Text 3 (~ / .config / sublime-text-3 / Packages / Default.sublime-theme).

+95
Jul 02 2018-12-12T00:
source share
β€” -

This is the best solution I've found: https://coderwall.com/p/jg4kog

  • Inside Sublime Text, go to Settings> Package Overview

  • Go to the user folder.

  • There you create a file called Default.sublime-theme

  • Open this file in Sublime Text and copy and paste the following JSON Object:

 [{ "class": "tab_control", "attributes": ["selected", "file_medium_dark"], "tint_modifier": [255, 255, 255, 80] }] 
+7
Nov 14 '13 at 14:21
source share

I had the same problem and I found this to be a great solution for me. I replaced the graphic icons used on the tabs to make dirty tabs more visible.

Replacing the graphics dirty_circle, dirty_circle_light and dirty_indicator does the trick.

Details, along with beautiful graphics, can be found here:

http://www.sublimetext.com/forum/viewtopic.php?f=3&t=5630

+4
Nov 14 '12 at 13:18
source share



All Articles