[sublimetext] Sublime Text 3 how to change the font size of the file sidebar?

Though I have tried to modify "font.size" in classes like "Label_control" and "sidebar_control" in the Package "Theme-Default", the font size of the editor does not change at all. Is there anything different in sublime text3?

This question is related to sublimetext sublimetext3

The answer is


I use Soda Dark 3 with icons enabled. So by just renaming it erases all the icons enabled with it. So I just leave the Default as it is and created a new file Soda Dark 3.sublime-theme and just have the following in the content

[
{
    "class": "label_control",
    "color": [150, 25, 25],
    "shadow_color": [24, 24, 24],
    "shadow_offset": [0, -1],
    "font.size": 16,
    "font.bold": true
},

]

So in Mac is it at /Users/gugovind/Library/Application Support/Sublime Text 3/Packages/User/


I'm using Sublime Text 3.2.1, a 4k display and a Mac. Tab titles and the sidebar are difficult to read with default ST3 settings. I used the menus Sublime Text -> Preferences -> Settings which opens two files: Preferences.sublime-settings--Default and Preferences.sublime-settings--User.

You can only edit the User file. The Default file is useful for showing what variables you can set. Around line 350 of the Default file are two variables as shown below:

// Magnifies the entire user interface. Sublime Text must be restarted for
// this to take effect.
"ui_scale": 1.0,

// Linux only. Sets the app DPI scale - a decimal number such as 1.0, 1.5,
// 2.0, etc. A value of 0 auto-detects the DPI scale. Sublime Text must be
// restarted for this to take effect.
"dpi_scale": 0,

"dpi_scale": 3.0 did nothing on my Mac "ui_scale": 1.5 worked well. The following is my User file.

{
    "dictionary": "Packages/Language - English/en_US.dic",
    "font_size": 17,
    "ignored_packages":
    [
        "Vintage"
    ],
    "theme": "Default.sublime-theme",
    "ui_scale": 1.5
}

If you are using the default theme. Just goto Preferences-> Default File Preferences A new tab pops up. At about line number you could see the font [font-name] [font-size]

Edit the font-size according to your wish and save.


If you want to change the font size then simply follow. Preferences-> Default File preferences.

After clicking on default file preferences, new Tab will open with name of Default File Type.Sublime-options

After find Font properties like font Courier New 12 we (recommend to use CTRL+F) then change size of it. Click save and instantly you can see the changes.


Default.sublime-theme file works unless you have installed a theme. If you did, go to your theme's github repo and download the your_theme.sublime-theme file and put it in your 'User' folder. In that file, find "class": "sidebar_label", add "font.size":16 to that section.


Navigate to Sublime Text>Preferences>Browse Packages. You should see a file tree.

In the Packages folder, you should see

Theme - Default > Default.sublime-theme (substitute Default for your theme name)

Open that file and find the "class": "sidebar_label: entry and add "font.size".

example:

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

To change the font name use

  "font.face": "Liberation Mono"

in this file, in my case with ST3 Default.sublime-theme


I followed these instructions but then found that the menu hover color was wrong.

I am using the Spacegray theme in Sublime 3 beta 3074. So to accomplish the sidebar font color change and also hover color change, on OSX, I created a new file ~/Library/"Application Support"/"Sublime Text 3"/Packages/User/Spacegray.sublime-theme

then added this code to it:

[
    {
        "class": "sidebar_label",
        "color": [192,197,203],
        "font.bold": false,
        "font.size": 15
    },
     {
        "class": "sidebar_label",
        "parents": [{"class": "tree_row","attributes": ["hover"]}],
        "color": [255,255,255] 
    },
]

It is possible to tweak many other settings for your theme if you can see the original default:

https://gist.github.com/nateflink/0355eee823b89fe7681e

I extracted this file from the sublime package zip file by installing the PackageResourceViewer following MattDMo's instructions (https://stackoverflow.com/users/1426065/mattdmo) here:

How to change default code snippets in Sublime Text 3?


Some limited flexibility is available if your using the Afterglow Theme.

https://github.com/YabataDesign/afterglow-theme

You can edit your user preferences in the following way.

Sublime Text -> Preferences -> Settings - User:

{
    "sidebar_size_14": true
}

https://github.com/YabataDesign/afterglow-theme#sidebar-size-options


On Ubuntu, for versions of Sublime older than 3.2, what worked for me was changing the dpi scale in Preferences > Settings — User by adding this line:

"dpi_scale": 1.10 

For Sublime 3.2, you can use the following line instead:

"ui_scale": 1.10

Adjust the scale value as needed. After this change, you have to restart Sublime Text for it to take effect.


Sublime Text -> Preferences -> Setting:

Sublime Text -> Preferences -> setting

Write your style in right screen:

Write your style in right screen


You need to change it at "class": "sidebar_label" Example, in your .sublime-theme file:

// Sidebar entry
{
    "class": "sidebar_label",
    "color": [212, 212, 213],
    "shadow_offset": [0, 0],
    "font.size":13
}

Credit