← Other topics

VSCode - Keyboard shortcuts to increase font size instead of zooming window

Video Notes

Choose your operating system to customize the notes

Mac Windows Linux

In VSCode the default keyboard shortcuts for zooming in/out are as follows:

  • Zoom in: cmd +
  • Zoom out: cmd -

When you use these shortcuts, it zooms the entire interface, but more often than not, I just want to zoom the editor pane where my code is.

To address this, I show in the above video how to make the following keyboard shortcut changes:

  • Zoom in
    • View: Zoom In - Remove cmd + shortcut (leave the existing shift cmd + shortcut for interface zooming in)
    • Edit Font Zoom In - Add cmd + shortcut
  • Zoom out
    • View: Zoom Out - Remove cmd - shortcut (leave the existing shift cmd - shortcut for interface zooming out)
    • Edit Font Zoom Out - Add cmd + shortcut

Here are the JSON settings if you want to quickly add them to your keybindings.json file:

{
    "key": "cmd+=", 
    "command": "-workbench.action.zoomIn" // Removes the default shortcut of zooming in interface with cmd +
},
{
    "key": "cmd+=",
    "command": "editor.action.fontZoomIn" // Adds the shortcut of zooming in editor with cmd + 
},
{
    "key": "cmd+-",
    "command": "-workbench.action.zoomOut" // Removes the default shortcut of zooming out interface with cmd -
},
{
    "key": "cmd+-",
    "command": "editor.action.fontZoomOut" // Adds the shortcut of zooming out editor with cmd -
}

If this info helped you out you can say thanks and support future content by clicking my Amazon affiliate link: https://amzn.to/3UtgnYk. If you make a purchase on Amazon within 24 hours of clicking the link I may receive a micro-commission and it costs you nothing extra. Any income from these sales goes directly to supporting me in making new videos and guides. Thank you for your support!

← Other topics