Is it possible to configure control + scroll-wheel to increase/decrease zoom in VS Code?
Visual Studio-CodeVisual Studio-Code Problem Overview
Similar to the default in the Visual Studio editors or Sublime, I would like to use control + scroll-wheel to change the font size / zoom level, rather than control-plus/minus. I did not see any option in the User or Workspace preferences.
Edit from Derek Morin: If you want this to be the default behaviour, please upvote: https://github.com/microsoft/vscode/issues/97137
Visual Studio-Code Solutions
Solution 1 - Visual Studio-Code
You can edit settings.json and add this line:
"editor.mouseWheelZoom": true
Or go to settings CTRL + ,
or File > Preferences > Settings
and search for:
mouseWheelZoom
Solution 2 - Visual Studio-Code
in newer versions :
> File -> preferences -> settings -> search for "mouse wheel zoom
"
Solution 3 - Visual Studio-Code
File > Preferences > Settings
and search for:
mouseWheelZoom
ā check this setting
Or,
CTRL + ,
go to settings Or,
edit settings.json
and add the below line inside the {parethesis}
Go the "editor.mouseWheelZoom": true
setting.json
all preferences
For reference {
"terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\wsl.exe",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"C_Cpp.updateChannel": "Insiders",
"terminal.integrated.shell.linux": "/bin/zsh",
"editor.fontFamily": "'Cascadia Code', Consolas, 'Courier New', monospace",
"editor.fontLigatures": true,
"editor.largeFileOptimizations": false,
"git.suggestSmartCommit": false,
"files.autoSave": "afterDelay",
"liveshare.audio.startCallOnShare": true,
"liveshare.presence": false,
"terminal.integrated.fontFamily": "MesloLGS NF",
"terminal.integrated.tabs.enabled": true,
"explorer.confirmDelete": false,
"tabnine.experimentalAutoImports": true,
"code-runner.runInTerminal": true,
"json.maxItemsComputed": 10000,
"quokka.darkTheme.error.decorationAttachmentRenderOptions": {
"border": null,
"borderColor": null,
"fontStyle": null,
"fontWeight": null,
"textDecoration": null,
"color": "#fe536a",
"backgroundColor": null,
"margin": "1.2em",
"width": null,
"height": null
},
"prettier.singleQuote": true,
"prettier.jsxSingleQuote": true,
"workbench.colorTheme": "Visual Studio Dark",
"workbench.iconTheme": "vscode-icons",
"editor.mouseWheelZoom": true
}
Solution 4 - Visual Studio-Code
In visual studio code :
File -> preferences -> settings -> search for "mouse wheel zoom" then tick the box
Solution 5 - Visual Studio-Code
If you are using Autohotkey you can write a script that presses Ctrl + = when you scroll your mouse up with Ctrl and Ctrl + - when you scroll your mouse down while holding Ctrl key as follows:
#IfWinActive ahk_class Chrome_WidgetWin_1
^WheelUp::
Send ^{=}
return
^WheelDown::
Send ^{-}
return
Solution 6 - Visual Studio-Code
The main problem is how VSCode is built, with a Electron frame and Microsoft Monaco Editor which is built with TypeScript and such web techniques. Therefore VSCode behaves exactly like a browser window would do - zooming the whole application including sidebar etc.
Solution 7 - Visual Studio-Code
Answered in https://stackoverflow.com/questions/49851574/zoom-only-text-in-visual-studio-code
On Mac, while pressing the command key, slide two fingers upward to zoom out. Slide downward to zoom in.