是否可以配置控制+滚轮增加/减少缩放在VS Code?

类似于Visual Studio编辑器或Sublime的默认设置,我想使用control +滚轮来改变字体大小/缩放级别,而不是control-plus/minus。在用户或工作区首选项中我没有看到任何选项。

编辑自Derek Morin: 如果你想让这成为默认行为,请投票: https://github.com/microsoft/vscode/issues/97137 < / p >

83693 次浏览

主要的问题是VSCode是如何构建的,使用电子相框和微软摩纳哥编辑器是用TypeScript和这样的web技术构建的。因此,VSCode的行为就像浏览器窗口一样——缩放整个应用程序,包括侧边栏等。

您可以编辑设置。Json,并添加这一行:

  "editor.mouseWheelZoom": true

或者进入设置CTRL + ,File > Preferences > Settings并搜索:

mouseWheelZoom

enter image description here

在较新的版本中:

文件->首选项->设置->搜索“mouse wheel zoom

如果你正在使用自动热键,你可以编写一个脚本,当你用Ctrl向上滚动鼠标时按Ctrl + ,当你按住Ctrl向下滚动鼠标时按Ctrl + -,如下所示:

#IfWinActive ahk_class Chrome_WidgetWin_1


^WheelUp::
Send ^{=}
return


^WheelDown::
Send ^{-}
return

在Visual Studio代码中只缩放文本中回答

在Mac上,按下命令键时,向上滑动两根手指即可缩小。向下滑动可放大。

在visual studio代码中:

文件→偏好→设置→搜索“鼠标滚轮缩放”;然后在方框上打勾

File > Preferences > Settings和搜索:

 mouseWheelZoom

✅检查此设置

或者,

去设置CTRL + ,

或者,

转到edit settings.json并在{parethesis}中添加下面的行

  "editor.mouseWheelZoom": true

为参考setting.json所有首选项

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

是否可以配置控制+滚轮增加/减少缩放在VS Code?

配置Ctrl+滚轮在VS Code中增加/减少缩放。

1: File >偏好比;设置

2:输入“mouseWheelZoom"

3:选择缩放选项: 如果你需要放大:Ctrl+鼠标滚轮(选择复选框) 在这里输入代码 如果您不需要放大:Ctrl+鼠标滚轮(取消选中复选框)

Image-1 for: File >偏好比;设置< / >

输入" mouseWheelZoom"