How to change font size in VS Code sidebar?
Solution 1
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 2
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 3
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 4
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
You can zoom in and zoom out:
zoom in:
Ctrl + +
zoom out:
Ctrl + -
Related videos on Youtube
![z33k](https://i.stack.imgur.com/xSEVw.jpg?s=256&g=1)
Comments
-
z33k over 2 years
Querying for
fontsize
inUser 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?
-
z33k almost 6 yearsGood answer. I'll only add that there's also a simpler workaround of zooming out with
CTRL
+-
to make all fonts smaller and then adjusting the ones we have control over accordingly. This however has a downside of scaling down also other UI elements like editor panes' tabs. It suited me, but your mileage may vary. -
Mihai Chelaru almost 6 yearsYes, that's a far simpler alternative indeed. Perhaps you could post it as an answer to give it more visibility.
-
oyalhi over 5 yearsI do this way also. However, sidebar's font either becomes 10 or 12, not 11 which I like. So I set the editor and terminal font size to 13, zoom out 1. The editor becomes 11, sidebar becomes 10. I can live with that at the moment.
-
corysimmons about 5 yearsIt's silly, but this is definitely the fastest and easiest-to-reason-about answer. Thanks.
-
Antonio Pavicevac-Ortiz over 4 years@corysimmons Thank you!
-
B2K about 4 yearsThe only thing missing from this answer is where to find the settings file. I was able to set the zoom level via the following:
Sidebar > Manage > Settings > Window > Zoom Level
. ThenText Editor > Font > Font Size
-
Antonio Pavicevac-Ortiz about 4 years@B2K Hi there! If you go to
Code > Preferences > Settings
you'll go to the GUI/pane for Settings, but then go to the top right, you'll see three icons, click the first one (from the left ) and it will take you to thesettings.json
file. -
temporary_user_name about 4 yearsAlternative you can just hit
⌘=
to zoom, then adjust font. -
windmaomao over 3 yearsthe
zoomLevel
is the killer. -
Dila Gurung over 3 yearsi followed every bits mentioned in, marketplace.visualstudio.com/… and copy and paste the following to custom css file but it did not work ..monaco-tree-row.has-children { font-weight: 500; margin: 8px; color: #eee; font-size: 14px; } .monaco-tree-row { font-weight: 300; margin: 5px; font-size: 12px; color: #bbb; }
-
scharfmn about 3 yearstwo years+ and this still worked beautifully
-
makkasi about 3 yearswhile this works, it is not the correct answer, because the question asks to increase font size only, while this answer increases the bars, menu sizes and actually everything that is not text related.
-
makkasi about 3 yearsThis is the best answer. It is the easiest. Also it doesn't increase the size of the icon bar, neither of the top bar. This way I don't lose space. Thank you.
-
ruffin almost 3 years@makkasi I think the point is that you can't edit the sidebar directly, but you can edit the "base" UI size and then edit the other text sizes to your preferences, which nearly reduces to the same thing. The downside, as you remark, is that there are side effects, but it does change the operative sidebar font size.
-
CodeConnoisseur about 2 yearsBest answer here.