64

Currently, when you zoom in while using vscode, the editor, side panel, and icons all get magnified.

Does anyone know how to get functionality similar to Atom where only the editor gets larger?

Chris
  • 1,101
  • 2
  • 9
  • 14

11 Answers11

137

Out of Box solution for zoom in/out for text only:

  1. Ctrl+Shift+P (or View->Command Palette...)
  2. Type Open User Settings
  3. Edit settings.json
  4. Add "editor.mouseWheelZoom": true
  5. Save it.

You can use your mouse wheel to zoom in or zoom out only text in the text box.

 

John Leonard
  • 909
  • 11
  • 18
user7418370
  • 1,371
  • 2
  • 7
  • 2
56

Update Version 1.24 - May 2018

There are new commands for to zoom in/zoom out text in editors only:

  • Editor Font Zoom In
  • Editor Font Zoom Out
  • Editor Font Zoom Reset

By default they don't have any keybindings assigned:

screenshot of font zoom commands

KyleMit
  • 30,350
  • 66
  • 462
  • 664
cezn
  • 2,705
  • 11
  • 16
26

You want the FontSize Shortcuts extension.

enter image description here

Installation:

  1. Ctrl + P
  2. ext install fontsize-shortcuts
  3. Restart Visual Studio Code.

The shortcuts are:

  • Ctrl + = to increase the font size.
  • Ctrl + - to decrease the font size.
  • Ctrl + 0 to reset the font size.
Shaun Luttin
  • 133,272
  • 81
  • 405
  • 467
  • 2
    this extension doesn't work very well anymore, at least not on mac (e.g. increasing the font does not work) – Klas Mellbourn Mar 22 '18 at 20:58
  • The docs cannot seem to agree if you use the `=` or `+` key to zoom in. As far as I can tell you must use `=`, which means you can't use the numeric keypad. When you do `Ctrl` + `+` you get the entire IDE zooming in and out, but with `=` it's just the font size. – Simon_Weaver Jun 29 '18 at 05:33
  • Your link now goes to a 404 page. – Scott Tesler Jun 21 '19 at 15:47
  • 2
    @ScottTesler Fixed. Thank you. – Shaun Luttin Jun 21 '19 at 17:39
  • Why this feature does not build-in on VS installation (Very very basic idea). hh very weird (Imagine on chrome you need to download extension for zoom in-out page). Thanks anyway. – Ezra Siton Mar 12 '20 at 11:18
5
  1. Ctrl + Shift + P to open the Command Palette
  2. Type Editor Font Zoom In
  3. Press Enter
  4. Repeat until the font is the desired size
Edward McCabe
  • 59
  • 1
  • 2
  • 3
    Hi Edward. This answer seems to be duplicating the steps already provided in the existing answers. Please try to avoid answering questions that already have suitable answers unless there is a unique solution to present to the community. Kind Regards. – Elletlar Nov 10 '20 at 17:55
4

To change the keyboard shortcuts so they only zoom the editor font, you just need to:

  1. Open the Command Palette (Control+Shift+P) and type Keyboard Shortcuts. Choose Preferences: Open Keyboard Shortcuts.
  2. Search for zoom. You'll see a few results, including those for global zoom and editor font zoom. 3)If you want to replace the global zoom shortcuts with editor font zoom, you first need to remove the keybindings from View: Zoom In and View: Zoom Out. You can right-click them and choose Remove Keybinding or select them and hit the delete key.
  3. Add the new keybindings for Editor Font Zoom In and Editor Font Zoom Out. You just select Editor Font Zoom In and click the + on the left hand side, type the keybinding you want (eg. Control+Shift+=) and then press enter.

Note: you might need to open new VS Code windows for these changes to take effect. If the keyboard shortcuts are still zooming the whole interface, you'll need to make sure that you have removed the keybindings from View: Zoom In and View: Zoom Out (see step 3 above)

enter image description here

Mustafa Poya
  • 2,615
  • 5
  • 22
  • 36
3
  1. Go to Settings
  2. Then, Swap to Workspace tab at the top
  3. at last, Change Editor: Font Size
Yousef Roshandel
  • 183
  • 1
  • 3
  • 11
2

Yes, you can change it as default. Try these steps:

  1. Open Visual Studio Code.
  2. Type command CTRL + SHFT + P.
  3. Type Settings. The settings file will open.
  4. Now under User > Text Editor > Font, find Font Size.
  5. Enter your desired font size.
tn2000
  • 642
  • 1
  • 8
  • 13
1

I cannot comment, but this is an update on cezn's answer and wruckie's question beneath it.

I also do not have these options in 1.64.2, however there is an Editor: Mouse Wheel Zoom option. Find it by searching for zoom. Works like a charm by holding ctrl.

mouse wheel zoom setting

mikibok
  • 35
  • 4
0
  1. Command+Shift+P (or View->Command Palette...)
  2. Search "editor font zoom"

You can zoom in, zoom out or reset to default and only the editor window will be effected.

Chris Schwab
  • 52
  • 1
  • 4
0

You can go to the keyboard shortcuts page, then search up "Editor Font Zoom", there should be some shortcuts you can bind to keys.

Cutewarriorlover
  • 158
  • 2
  • 11
0

1.- Go to Settings:

File -> Preferences -> Settings (Ctrl + ,)

2.- Go to the font size settings:

Text Editor -> Font -> Font Size

3.- Set the desired font size, this will only apply to the editor but not to the rest of the application.

enter image description here