Changing sidebar’s font size in Sublime Text 3
Changing font size of editor (by adding "font_size": 14
for example to Preferences > Settings – User file) changes font size of editor area. But leaves font size of sidebar unaffected. I have found files and folders’ names, drawn on sidebar with 10 pt font size, quite not so comfortable on Full HD resolution screen.
So, I needed a fix.
There’s (of course!) a Stack Overflow answer, that explains, how to achieve this in Sublime Text 2. I managed to port this solution to Sublime Text 3.
There is a slight difference in packages management in Sublime Text 3, discussed here. In particular, some (all?) packages are now zipped and their configuration file is inside archive. Chapter “Overriding Files From a Zipped Package” explains how to override such configuration files. Read it, if you were overriding configuration files in Sublime Text 2, as this has changed.
Under Windows, all Sublime Text’s local files (configuration, macros, snippets etc.) are kept in c:\Users\[USERNAME]\AppData\Roaming\Sublime Text 3 folder (match folder location for your system, if you’re not under Windows). This is called “Data” folder for ST3. All theme files are kept in Installed Packages subfolder. And there you have to start, if you wish to follow this guide.
What I did was:
- Close all running instances of Sublime Text 3.
- Locate theme file in Installed Packages subfolder. I’m using Nil theme, so it was
Theme - Nil.sublime-package
file. - Unzip and edit theme configuration file.
- Bright version of Nil theme is called Ayin, so I unzipped
Ayin.sublime-theme
file. - Locate first occurrence of block with
"class": "sidebar_label",
entry. - Add
"font.size": 15.0
line as the new last line of this block (and comma to previous line, of course). - Save changed file and place it in Packages subfolder of Sublime Text 3’s “Data” folder.
- Start up Sublime Text 3 again
There’s a small bug in Sublime Text 3, which causes, that when value of font.size
is bigger than 15.0
, entries on sidebar becomes cut off.
Using very similar approach you can easily change font size and other attributes of tab strip. Locate block with "class": "tab_label"
and add "font.size": 11
to the end of it. The same small bug occurs here and it causes tab texts to get cut off, when font size is higher than 11
.
If your eyes become tired with shadow below each sidebar entry, you can easily disable it, by adding / changing shadow_offset
to [0, 0]
.
When overriding particular settings with the technique discussed here and above, keep in mind that it is good to put entire configuration files to Packages subfolder of Sublime Text 3’s “Data” folder. Not just those lines and flags that you’re actually modifying.
For most of plugins and settings, Sublime Text 3 is merging overridden user settings with rest of default configuration files (as shown in Sublime Text 3’s user configuration article for example). But, to not waste your time, you should consider just copying entire configuration files.