Sublime Forum

Problem with shrinking file tabs

#1

Trying out version 2 alpha, looking very good so far. But I can’t read the file tabs when many files are open, see attachment. If possible, I’d like to:

  • remove the close buttons in the tabs to save space
  • change the tab font size
  • enforce a minimum tab width
  • alternatively, avoid shrinking tab width altogether
  • have file tabs scroll off the screen instead of trying to squeeze everything in

Is there any way to do this in v2alpha? I’ve tried editing suspicious-looking options in \Packages\Theme - Default\Default.sublime-theme, but nothing I do there seems to change anything, even after restarting Sublime Text. Thanks!

0 Likes

#2

[quote]* remove the close buttons in the tabs to save space

  • change the tab font size[/quote]

I don’t think these are good ideas.

But I agree sth should be done here. You can vote for my multi-line tabbar idea on sublimetext.userecho.com/feedbac … an-option/. My postulates are it should be configurable:

-tabbar can go multiline (yes/no)
-minimum tab width (set value)

If multiline is set to “no” and there are more tabs that can fit in the screen (satisfying the mimimum tab width value) - arrows for horizontal scroll should appear.

0 Likes

#3

I think you’re misunderstanding me. I’m not suggesting that this should be made the default, I’m just asking if there are options in the configuration files so that I can change them for myself. At least there used to be in version 1.

0 Likes

#4

I posted this a week ago, but no helpful replies so far. Please forgive me if I bump this (once only, promise). My question:

Are there any settings in v2alpha I can tweak to help readability of tab names when many files are open?

0 Likes

#5

Default.sublime-theme (found in Packages/Theme - Default) is the file you should edit.

I’ve learned a couple of things myslef. You can:

-change tab height (tab_height)
-set tab width (tab_width)
-set min tab width (tab_min_width) - it’s not useful at the moment (tabs that won’t fit in the screen are hardly accessible)
-set foreground and background colors as well as opacity
-change various margins
-change tab overlap (tab_overlap)
-create your own background for tabs by editing png files (found in Packages/Theme Default)
-remove the close button by commenting out the section which starts with “id”: “tab_close_button”
-possibly you can change the font, but I can’t see any defaults and don’t know how to set it

If you succeed in augmenting tab readability please share.

0 Likes

#6

Thank you qqq, that was very helpful. I gained a lot of tab space without adding too much clutter by making just a few changes.

  • removed the tab close button (I always use CTRL-W anyway) - this gained a lot of space.
  • slightly increased tab overlap
  • decreased some margins

Here are the settings I used, in case someone else finds them useful. Original values are also included - these are the lines preceded by triple comment slashes ‘///’. The previous post by qqq describes how to remove the close buttons.

{ "id": "tabset_control", "class": "tabset_control", "layer0.texture": "Theme - Default/tabset.png", "layer0.inner_margin": [1, 2], "layer0.opacity": 1.0, "content_margin": [0,4,0,3], ///"content_margin": [3, 4, 3, 3], "tab_overlap": 20, ///"tab_overlap": 17, "tab_width": 50, "tab_min_width": 40, "tab_height": 28 }, { "id": "tab_control", "class": "tab_control", "layer0.texture": "Theme - Default/tab_normal.png", "layer0.inner_margin": [18, 4], "layer0.opacity": 1.0, "layer1.texture": "Theme - Default/tab_selected.png", "layer1.inner_margin": [18, 4], "layer1.opacity": { "target": 0.0, "speed": 6.0, "interpolation": "smoothstep" }, //"layer2.texture": "Theme - Default/tab_glow.png", //"layer2.inner_margin": [18, 4], //"layer2.opacity": { "target": 0.0, "speed": 4.0, "interpolation": "smoothstep" }, "content_margin": [14, 0, 0, 0], ///"content_margin": [20, 4, 13, 4], "hit_test_level": 0.5 },

Finally, some feedback to the developer: as tab space becomes more limited, you abbreviate file names using ellipses “…”. I think this is a very good idea, but in my opinion you take it too far when you do this for each word in the file name. For example, here are three tabs I have open at the moment:

C…v…B…m…- C…
T…m…l - b…d…
e…r…- 2…d…s…

The original file names were:

Convolution vs Box model - C cycle.lst
Temperature model - box diffusion.lst
emission results - 2 degree scen - new.dat

I think it would be better to only use one ellipsis per file name. Something like this would be much more useful:

Convolution v…ycle.lst
Temperatu…usion.lst
emission re…new.dat

0 Likes

#7

Where to paste this code?

0 Likes

#8

@cheesecake23 how did you achieve such narrow file tabs? Mines extend as long as the file name is, what is very annoying. I already tried with Preferences.sublime-settings and My.Sublime-theme, but unsuccessful :frowning:

0 Likes