VSCode zoom only font not whole editor

Ever been screen sharing your code editor (in my case VSCode) and someone asks to bump up the font size? Yes, me too.. All the time. The annoying part of VSCode is they provide keyboard short cuts to zoom. But this applies to the whole of VSCode.

Being able to just increase the editor font size isn't something standard, but as with VSCode pretty much everything is customisable. To create custom key bindings to only increase the editor font size (zoom) you do the following: (Mac instructions)

Instructions for Mac

  1. Code > Preferences > Keyboard Shortcuts
  2. This opens a GUI for keyboard shortcuts - click on the tab "Keyboard Shortcuts", and an icon with a file and arrow will appear (title - Open Keyboard Shortcuts JSON)
  3. Copy paste the below JSON into the file and save
  4. Done
[
	{
		"key": "cmd+=",
		"command": "editor.action.fontZoomIn"
	},
	{
		"key": "cmd+-",
		"command": "editor.action.fontZoomOut"
	},
	{
		"key": "cmd+0",
		"command": "editor.action.fontZoomReset"
	}
]

Instructions for Windows

  1. File > Preferneces > Keyboard Shortcuts
  2. This opens a GUI for keyboard shortcuts - click on the tab "Keyboard Shortcuts", and an icon with a file and arrow will appear (title - Open Keyboard Shortcuts JSON)
  3. Copy paste the below JSON into the file and save
  4. Done
[
	{
		"key": "ctrl+=",
		"command": "editor.action.fontZoomIn"
	},
	{
		"key": "ctrl+-",
		"command": "editor.action.fontZoomOut"
	},
	{
		"key": "ctrl+0",
		"command": "editor.action.fontZoomReset"
	}
]

Note: you will need to change the keybaord item, cmd for Mac and ctrl for Windows to match the correct key for your environment.

Note: as pointed out on twitter by Matteo the + and - key values are the keys "normally" next to the 0 and backspace, not the keys on a numpad