In Microsoft's VS Code, I can zoom in and out with the keyboard shortcuts ⌘+
and ⌘-
. These commands affect the entire interface, such as the file explorer and both editor windows.
I'd like a way to zoom in and out of only the active editor window. How can I do this?
Clarification: I don't want to change the window size. I only want to change the apparent font size of the text I'm editing.
As I mentioned in the comments shortly after the original post, you can change the font-size for the editors. That change will not affect other parts of the UI like the activity bar or explorer. But it will affect all editors, not only the active one.
Open the user settings (either by clicking the gear icon in the lower left or by Ctrl-,) and entering, in the split pane for entering user settings, modify:
"editor.fontSize": 18,
EDIT: As of v1.24 you can now zoom only the editors (and not the entire interface). See font zoom controls.
Font zoom commands have been added and they increase or decrease the font size of the editor while the rest of VS Code UI is left as-is. This feature is very handy for presentations and pair-programming.
Use the following keybindings to replace the default global zoom actions:
on macOS:
{ "key": "cmd+numpad_add", "command": "editor.action.fontZoomIn" },
{ "key": "shift+cmd+=", "command": "editor.action.fontZoomIn" },
{ "key": "cmd+=", "command": "editor.action.fontZoomIn" },
{ "key": "cmd+numpad_subtract", "command": "editor.action.fontZoomOut" },
{ "key": "shift+cmd+-", "command": "editor.action.fontZoomOut" },
{ "key": "cmd+-", "command": "editor.action.fontZoomOut" },
{ "key": "cmd+numpad0", "command": "editor.action.fontZoomReset" },
{ "key": "cmd+0", "command": "editor.action.fontZoomReset" },
on Windows and Linux:
{ "key": "ctrl+numpad_add", "command": "editor.action.fontZoomIn" },
{ "key": "shift+ctrl+=", "command": "editor.action.fontZoomIn" },
{ "key": "ctrl+=", "command": "editor.action.fontZoomIn" },
{ "key": "ctrl+numpad_subtract", "command": "editor.action.fontZoomOut" },
{ "key": "shift+ctrl+-", "command": "editor.action.fontZoomOut" },
{ "key": "ctrl+-", "command": "editor.action.fontZoomOut" },
{ "key": "ctrl+numpad0", "command": "editor.action.fontZoomReset" },
{ "key": "ctrl+0", "command": "editor.action.fontZoomReset" },
You need to add those keybindings in order to override existing zoom controls using the same bindings - otherwise you will get the old behavior of the entire interface zooming.