visual-studio 有没有办法使用键盘快捷键缩放 Visual Studio 文本编辑器?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3096600/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 12:09:08  来源:igfitidea点击:

Is there a way to zoom the Visual Studio text editor with a keyboard shortcut?

visual-studiovisual-studio-2010visual-studio-2012visual-studio-2013visual-studio-2015

提问by ahsteele

Yesterday I found myself needing to zoom my Visual Studio text editor and was without a mouse (don't ask). Typically I do this by holding down CTRLand scrolling the mouse wheel. I also couldn't figure out how to tab into the area where you can specify your zoom level in the lower left hand corner of the text editor window.

昨天我发现自己需要缩放我的 Visual Studio 文本编辑器并且没有鼠标(不要问)。通常我通过按住CTRL并滚动鼠标滚轮来做到这一点。我也无法弄清楚如何在文本编辑器窗口的左下角指定您可以指定缩放级别的区域。

zoom in the lower left corner of the text editor window

放大文本编辑器窗口的左下角

So I guess I have two questions:

所以我想我有两个问题:

  1. Is there a menu setting somewhere that I could have navigated to via the keyboard to set my zoom level?
  2. Even better is there a similar keyboard command to holding CTRLand scrolling the mouse wheel?
  1. 我可以通过键盘导航到某处以设置缩放级别的菜单设置吗?
  2. 更好的是是否有类似的键盘命令来按住CTRL和滚动鼠标滚轮?

回答by Brandon

I don't know if there is a menu option, but there are keyboard shortcuts to set the zoom level.

不知道有没有菜单选项,但是有设置缩放级别的键盘快捷键。

ctrl+shift+.to Zoom In

ctrl+ shift+.放大

ctrl+shift+,to Zoom Out

ctrl+ shift+,缩小

回答by David French

In my case, ReSharper reassigned Ctrl+ Shift+ ,(aka Ctrl+ Shift+ <) to ReSharper's Recent Edits command, and I wanted to reset it back to Visual Studio 2012's zoom out.

就我而言,ReSharper 将Ctrl+ Shift+ ,(又名Ctrl+ Shift+ <)重新分配给 ReSharper 的“最近编辑”命令,我想将其重置回 Visual Studio 2012 的缩小。

To do that, go to Tools -> Options. Under Environment -> Keyboard, remove the Ctrl+ Shift+ ,hotkey from the ReSharper.ReSharper_GoToRecentEdits command (or any other commands), and assign the View.ZoomOut command back to Ctrl+ Shift+ ,(use either Global or TextEditor mode).

为此,请转到工具 -> 选项。在 Environment -> Keyboard 下,从 ReSharper.ReSharper_GoToRecentEdits 命令(或任何其他命令)中删除Ctrl+ Shift+,热键,并将 View.ZoomOut 命令分配回Ctrl+ Shift+ ,(使用全局或文本编辑器模式)。

回答by Leonardo

Visual Studio Code Linux keyboard shortcutsfor zoom in/out:

用于放大/缩小的Visual Studio Code Linux 键盘快捷键

  • in: Ctrl+ =
  • out: Ctrl+ -
  • 在:Ctrl+=
  • 出:Ctrl+-

Visual Studio Code Linux keyboard shortcuts

Visual Studio Code Linux 键盘快捷键

回答by vivek86

The default accessibility setting by Microsoft, if they havent been tampered or changed are:

Microsoft 的默认辅助功能设置(如果它们未被篡改或更改)是:

Zoom In --> Ctrl+ +

放大 --> Ctrl++

Zoom Out --> Ctrl+ -

缩小 --> Ctrl+-

Here is the link to the official Microsoft's VS code accessibility page

这是微软官方 VS 代码可访问性页面的链接

Hope it helps someone else

希望它能帮助别人

回答by Emilio

If anyone is looking for an answer to the first question (as I was), you can hit Ctrl+F2, then hit the Tabkey three times. This works in VS 2019, but doesn't appear to work in 2017.

如果有人正在寻找第一个问题的答案(就像我一样),您可以按Ctrl+ F2,然后按Tab三下键。这在 VS 2019 中有效,但在 2017 中似乎不起作用。