你最喜欢的Visual Studio快捷键是什么?我总是把我的手放在键盘上,远离鼠标!

请回答一个问题。


当前回答

格式的文档

   Ctrl+K, Ctrl+D

On an aspx page, this takes care of properly indenting all of your markup and ensures that everything is XHTML compliant (adds quotes to attributes, corrects capitalization, closes self-closing tags). I find that this makes it much easier to find mismatched tags and to make sure that my markup makes sense. If you don't like how it's indenting, you can control which tags go on their own line and how much space they get around them under Tools/Options/Text Editor/HTML/Format/Tag Specific Options. In your C# or VB code, this will correct any capitalization or formatting issues that didn't get caught automatically. For CSS files, you can choose compact (one definition per line), semi-expanded, or expanded (each rule on its own line); and you can choose how it handles capitalization.

其他回答

插入片段:

Ctrl + K, Ctrl + S

我经常用if来表示try..catch和#region

嗯,没人叫F1帮忙。 谷歌能更快更好地获取你需要的信息吗?

在调试模式下,Alt *跳转到当前断点,在此停止执行。

简单的一个。F8:转到下一次构建错误。 发现现在它将在任何类型的列表窗口(通常聚集在底部的那些)中工作。

按Ctrl+Shift+F4关闭所有窗口。你必须自己绘制地图:

产品说明:

在Visual Studio中,选择工具|选项 在环境下选择键盘 在显示包含的命令中,输入 Window.CloseAllDocuments。你应该 在列表框中获取单个条目 在它的下面 将光标置于“按快捷键” 并按Ctrl+Shift+F4。 单击OK

这要归功于codebetter.com的Kyle Baley。我修改了他的例子,使用shift而不是alt,因为这对我来说更容易。