How to change font size in VS Code sidebar?
Visual Studio-CodeFont SizeSidebarVscode SettingsVisual Studio-Code Problem Overview
Querying for fontsize
in User Settings
window yields only settings for:
- editor panes,
- suggest widget,
- markdown preview,
- integrated terminal
as you can see below:
Doing the same for sidebar
gives even poorer results:
Having fonts of different sizes in editor panes and sidebar looks... let's settle with: not too nice. Have I just found the greatest omission of this awesome tool?
Visual Studio-Code Solutions
Solution 1 - Visual Studio-Code
Just want to add to the discussion, If you set:
"window.zoomLevel": "your number",
In my case I started with zero, you can use that as sort of a baseline:
"editor.fontSize": 14,
"editor.tabSize": 2,
"terminal.integrated.fontSize": 14,
"window.zoomLevel": 0,
"[Log]": {
"editor.fontSize": 14
},
And then tweaked until I was happy.
E.g. you want to increase the sidebar font size keeping editor font size unchanged: set "window.zoomLevel": 0.5
and "editor.fontSize": 18
. Look at the result. Play with both values to get the result you like.
Hope this helps!
Solution 2 - Visual Studio-Code
Mihai Chelaru's answer presents a way to do more than just adjust the sidebar's font size. This, however, comes with a price of a bit of fiddling, possibly more than you'd be ready for, if the only thing you were interested in was the simple act of changing the sidebar's font size. So here's a simpler solution.
Just zoom the whole VS Code's UI in or out with CTRL++ or CTRL+- respectively and than adjust font sizes we do have control over in settings.json
file, i.e.:
editor.fontSize
,editor.suggestFontSize
,markdown.preview.fontSize
,terminal.integrated.fontSize
so everything matches. That's it.
Solution 3 - Visual Studio-Code
This has been a feature request for some time. The short answer is right now there's no VSCode setting that allows you to customize the sidebar font size. There is a hacky workaround solution proposed by @lindesvard in the same issue thread that involves using the Custom CSS and JS Loader extension to load in a custom CSS file that modifies the sidebar styling if you're willing to experiment with it.
To get this working follow the Getting Started section in the extension details, then add URLs to your custom files to the "vscode_custom_css.imports": [""]
array. (Note that on Windows mine looks like the following: "vscode_custom_css.imports": ["file:///C:\\dev\\vscode-styling.css"]
)
Below are before and after adding the CSS mentioned by @PSVapour in a later comment:
Note that this also affects the command palette font.
Solution 4 - Visual Studio-Code
Apart from @Mihai Chelaru's answer, I found another plugin which helped me dealing with this issue. The name of the plugin is CustomizeUI
.
CustomizeUI
relies on the Monkey Patch Extension
to inject custom javascript in VSCode. Here is the settings I use (in settings.json
) for my Mac:
"customizeUI.stylesheet": {
".explorer-viewlet .mac": "font-size: 1.2em !important; overflow: auto; border-left:none!important",
},
Again, this plugin is meant to do more than just changing the font size of the sidebar. But it has some minor advantages over Custom CSS and JS Loader. Like:
-
It won't show
Unsupported
on the title-bar or won't show any error message likeYour installation is corrupted
. -
You do not have to reload settings every time VS Code is updated.
Solution 5 - Visual Studio-Code
You can zoom in and zoom out:
zoom in:
Ctrl + +
zoom out:
Ctrl + -
Solution 6 - Visual Studio-Code
Change the font size with keyboard shortcuts using the FontSize Shortcuts plugin. On a Mac, I am able to focus on the terminal or the editor and change the font size of those areas independently of each other. https://marketplace.visualstudio.com/items?itemName=fosshaas.fontsize-shortcuts