Sublime Text 3 how to change the font size of the file sidebar?
SublimetextSublimetext3Sublimetext Problem Overview
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?
Sublimetext Solutions
Solution 1 - Sublimetext
The answers are omitting the square brackets, in the case one is creating the file from scratch.
To recap, for the ST3 users who don't have the Default.sublime-theme
file (which is actually the default configuration), the simplest procedure is:
- Navigate to Sublime Text -> Preferences -> Browse Packages
- Open the
User
directory - Create a file named
Default.sublime-theme
(if you're using the default theme, otherwise use the theme name, e.g.Material-Theme-Darker.sublime-theme
) with the following content (modifyfont.size
as required):
[ { "class": "sidebar_label", "color": [0, 0, 0],
"font.bold": false,
"font.size": 12
},
]
For reference, here there is the full file (as found in ST2).
Ubuntu 18.04
Location of theme setting on Ubuntu 18.04, installed via sudo apt install sublime-text
:
~/.config/sublime-text-3/Packages/User/Default.sublime-theme
MacOS
Location of theme setting on MacOS, installed via DMG:
~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User/Default.sublime-theme
Solution 2 - Sublimetext
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.
Solution 3 - Sublimetext
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
},
Solution 4 - Sublimetext
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:
https://stackoverflow.com/questions/21190392/how-to-change-default-code-snippets-in-sublime-text-3
Solution 5 - Sublimetext
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
}
Solution 6 - Sublimetext
To change the font name use
"font.face": "Liberation Mono"
in this file, in my case with ST3 Default.sublime-theme
Solution 7 - Sublimetext
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.
Solution 8 - Sublimetext
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
}
Solution 9 - Sublimetext
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
Solution 10 - Sublimetext
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/
Solution 11 - Sublimetext
In my case using (Sublime Text 3.0) just adding one more thing with font size, I also given padding and indent inside the sidebar becuase it wasn't looking good. Now Looking much better now
>> 3 simple steps
>copy the content and past right hand side.
[ { "class": "sidebar_label", "font.size": 18 }, { "class": "sidebar_tree", "row_padding": [9, 10],
"indent": 12,
"indent_offset": 12,
},
]
Solution 12 - Sublimetext
In Sublime 3, there is a simpler way using UI and menus.
Go to Preferences->Font->Larger
The keyboard shortcut is Command+
, note that you have to press Shift to get plus on most keyboards.
I've used this on Mac. It might be different on Windows.
Solution 13 - Sublimetext
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.
Solution 14 - Sublimetext
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
Edit the font-size according to your wish and save.
Solution 15 - Sublimetext
Sublime Text -> Preferences -> Setting:
Write your style in right screen: