21

I would like to increase the font size of the left side bar in Sublime Text 3. I can't seem to find a good way to do this. I am using the default theme, and am on Mac.

Does anyone have a suggestion? I don't want to install a custom theme, but would just like to increase the font size of the side bar.

Thanks!

David J.
  • 31,569
  • 22
  • 122
  • 174
Gurpreet
  • 762
  • 1
  • 7
  • 9
  • 2
    It is NOT necessary to go into the zip file, as the accepted answer suggests. Just create a simple textfile Data\Packages\User\Default.sublime-theme and only put your changes there. See https://stackoverflow.com/a/25694790/362951 – mit May 22 '17 at 18:59
  • I tried this method, as it seemed quicker. However, my Sublime directory structure seems to differ (Mac OSX El Cap). I put my changes (a file called 'Default.sublime-theme') here: '/Users/[myname]/Library/Application Support/Sublime Text 3/Packages/User' and it had no effect/didn't seem to work, after restarting Sublime. – Jeff Brewster Aug 10 '17 at 17:45
  • someone know a way to have a shortcut do this? – Aryeh Beitz Dec 27 '17 at 09:04

2 Answers2

62

You will need to edit the .sublime-theme file to do this. 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 ShiftP 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.

MattDMo
  • 100,794
  • 21
  • 241
  • 231
  • 1
    I wonder if there is system behind this madness. Why did Sublime3 configuration become *MORE* complicated? – Domi Jan 10 '15 at 10:12
  • @Domi this is exactly the same way you configure a theme in ST2, without the package extraction step. What's your point? – MattDMo Jan 10 '15 at 21:59
  • 1
    @MattDMo The PRM shipped with ST2 didn't it? Either way, I have to apologize. I was upset yesterday because it took me about an hour to get this done due to invalid paths listed in the manual (on Windows, it's not the path everyone keeps repeating all over SO and Superuser; I finally stumbled upon a comment that hinted at using the console to look them up). – Domi Jan 11 '15 at 06:16
  • 2
    thanks for your answer, really helped me. One more thing, do you know, how can I enlarge the line-heigh? I changed font-size to 24 (I need so large), and lines are too close. Thanks a lot – areim Sep 16 '15 at 11:34
  • @areim: Preferences > Settings > User, "line_padding_bottom": 1, "line_padding_top": 1, – smendola Nov 21 '15 at 18:42
  • Editing that section of "Default.sublime-theme" actually caused my sidebar to go completely black, and show nothing. This persisted after I reverted the changes I had made. Has anyone else had this happen? – rharrington Jun 07 '16 at 12:52
  • I just reinstalled Sublime Text and then followed the instructions in the accepted answer in http://stackoverflow.com/questions/18288870/sublime-text-3-how-to-change-the-font-size-of-the-file-sidebar -- basically the same as the answer above, except that you create a new user override file for the theme file, instead of editing the original. This worked for me. – rharrington Jun 07 '16 at 13:06
  • 1
    This worked perfectly for me on OSX. (As you save the file you can see your changes--no restart required). – Jeff Brewster Aug 10 '17 at 18:04
  • this is really ridiculously convoluted. i love most of ST, but its documentation relies way too heavily on its user base. – JL Peyret Jan 20 '19 at 05:39
  • It does not work for me. I opened `/opt/sublime_text/Packages/Default.sublime-package` with simply `file-roller`, but there was no `Default.sublime-theme` file. I added it with the contents `[ { "class": "tab_label", "font.size": 16, },]` and I restarted Sublime, but the tab text size is not changed. I'm using Sublime 3.2.1 on Lubuntu 18.0.4 – Marco Sulla Jul 26 '19 at 09:16
  • I solved simply putting `"ui_scale": 1.6,` in user preferences – Marco Sulla Jul 26 '19 at 10:01
2

Thanks for this, just to add that, with sublime text 3 at least, i needed to modify the theme I use. e.g. Flatland Dark.sublime-theme