Sublime 3: How to change font size on Sidebar? - Ubuntu version

Alexis picture Alexis · Jun 4, 2014 · Viewed 21.5k times · Source

I'm trying to to change the size of my sidebar in sublime text 3, version for Ubuntu, but i just can't get it working, i read lots of posts about it, they said that i should have something like this:

{
    "class": "sidebar_label",
    "color": [0, 0, 0],
    "font.bold": false,
    "font.size": 14
},

on my settings - default, but nothing like it in there, for example i find there "bold_folder_labels": true and works like a charm in my settings - user, but i try to put here the "class": "sidebar_label" with "font.size" and not results at all, maybe I'm just doing it wrong, please a little help, the text is so small that i can hardly read it. Another thing i observed:

  • Changing theme doesn't affects the sidebar

I don't remember if this is always true, but i think on my older laptop changing that change the colors of the sidebar and fonts, i remember use it before soda theme for getting smaller fonts on a low resolution laptop.

Thanks in advance, regards

Answer

MattDMo picture MattDMo · Jun 4, 2014

You will need to edit the Default.sublime-theme file to do this, not your preferences. Unfortunately, in Sublime Text 3 this file is contained in a zipped .sublime-package file, so you'll need to extract that first. Install the PackageResourceViewer plugin via Package Control, then hit CtrlShiftP (ShiftP on OS X) and type prv to bring up the PackageResourceViewer options. Select Open Resource, scroll down to Theme - Default, hit Enter, scroll down to Default.sublime-theme, and hit Enter again to open it.

Next, search for sidebar_label and modify the first one (on line 362) to look like this (it needs to be valid JSON):

{
    "class": "sidebar_label",
    "color": [0, 0, 0],
    "font.bold": false,
    "font.italic": false, // <-- add comma
    "font.size": 14 // <-- new line
    // , "shadow_color": [250, 250, 250], "shadow_offset": [0, 0]
},

Save the file, and you should see the sidebar font size change. You can change 14 to whatever size you want, depending on your personal preferences.


If you want to do this in Sublime Text 2, it's a bit easier, as nothing is zipped up. Select Preferences -> Browse Packages... to open up your Packages folder in your operating system's file navigator. Enter the Theme - Default subdirectory and open Default.sublime-theme as a JSON file, then edit it as above.

Good luck!