visual-studio Shift + Enter 不再在 Visual Studio 中添加新行

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4317586/
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:49:41  来源:igfitidea点击:

Shift + Enter no longer adds a new line in Visual Studio

visual-studio

提问by Mike Pateras

I installed the Visual Studio 2010 productivity power tools, and since then Shift + Enter does not add a new line in the text editor. I've tried disabling all of the productivity tools settings and even uninstalling the productivity power tools entirely, but Shift + Enter still does nothing. I can't find the setting for this.

我安装了 Visual Studio 2010 生产力动力工具,从那时起 Shift + Enter 不会在文本编辑器中添加新行。我已经尝试禁用所有生产力工具设置,甚至完全卸载生产力工具,但 Shift + Enter 仍然没有任何作用。我找不到这个设置。

How can I re-enable shift + enter to add a space (just like enter alone does)?

如何重新启用 shift + enter 以添加空格(就像单独输入一样)?

回答by sbi

  • Go to Tools/Options/Environment/Keyboard.
  • Switch the "Use new shortcut in:" dropdown to "Text Editor".
  • Pick the Edit.BreakLinecommand.
  • In the Press shortcut keysedit pane press Shift+Enter.
  • Tools/Options/Environment/Keyboard
  • 将“使用新快捷方式:”下拉菜单切换为“文本编辑器”。
  • 选择Edit.BreakLine命令。
  • Press shortcut keys编辑窗格中按Shift+ Enter

回答by TZHX

From Options menu, select "Environment", then "Keyboard" that gives you the option of setting keyboard shortcuts. The one you want should be "Edit.BreakLine" - you can search for them. Selecting this, you can then add/remove assosciated shortcuts.

从选项菜单中,选择“环境”,然后选择“键盘”,您可以选择设置键盘快捷键。你想要的应该是“Edit.BreakLine”——你可以搜索它们。选择此项后,您可以添加/删除关联的快捷方式。

回答by Medet Tleukabiluly

In new versions it was changed to Ctrl+Shift+Enter, And you easily can change it as sbisuggested

在新的版本中,它改为Ctrl+ Shift+ Enter,你可以轻松地改变它作为履行建议

回答by Denis Shchepetov

Try Ctrl + Shift + Enter to add a line bellow.

尝试 Ctrl + Shift + Enter 在下面添加一行。

Ctrl + Enter will add a line above.

Ctrl + Enter 将在上面添加一行。