Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to configure control + scroll-wheel to increase/decrease zoom in VS Code?

People also ask

How do I enable Ctrl scroll zoom in VS Code?

Steps to enable Mouse Scroll Zoom in Visual Studio CodeOn Search Settings , type mouse wheel zoom . Check the checkbox under Editor: Mouse Wheel Zoom . This will automatically save the settings. When you go back to your code, you will now be able to use Ctrl + Mouse Wheel to zoom the font in your editor.

How does VS Code increase and decrease size?

In Visual Studio Code, by pressing Ctrl + and Ctrl - you can change the overall font size of the IDE. This helps faster than changing settings in every session.

How do you zoom with scroll wheel?

Luckily, we know a shortcut that lets you quickly zoom with the scroll wheel on your mouse. While in edit mode, hold CTRL and move the scroll wheel to zoom in and out. If you're on a laptop with a trackpad, hold CTRL and use the pinch gesture to zoom.


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

enter image description here


in newer versions :

File -> preferences -> settings -> search for "mouse wheel zoom"


File > Preferences > Settings and search for:

 mouseWheelZoom

✅ check this setting

Or,

go to settings CTRL + ,

Or,

Go the edit settings.json and add the below line inside the {parethesis}

  "editor.mouseWheelZoom": true

For reference setting.json all preferences

{
  "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
}

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.


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

In visual studio code :

File -> preferences -> settings -> search for "mouse wheel zoom" then tick the box