问题
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?
回答1:
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
回答2:
Working on Ubuntu here, and these solutions didn't work for me. What worked was changing the dpi scale in Preferences > Settings- User by adding this line:
"dpi_scale": 1.10
After changes, you have to restart Sublime Text for it to take effect.
回答3:
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
},
回答4:
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?
回答5:
To change the font name use
"font.face": "Liberation Mono"
in this file, in my case with ST3 Default.sublime-theme
回答6:
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
}
回答7:
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.
回答8:
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
回答9:
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/
回答10:
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
回答11:
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.
回答12:
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.
回答13:
Sublime Text -> Preferences -> Setting:
Write your style in right screen:
来源:https://stackoverflow.com/questions/18288870/sublime-text-3-how-to-change-the-font-size-of-the-file-sidebar