你最喜欢的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+[(移动到对应的}) Ctrl+Shift+V(循环剪贴板)

Ctrl+ E + D:格式化文档

给团队的建议:在Visual Studio中设置一致同意的格式选项(它们非常灵活),然后将设置导出到.settings文件中,供每个开发人员导入。

现在,如果所有开发人员都学会自动格式化所有内容,那么它不仅可以在整个项目中毫不费力地产生完美的格式一致性,而且还可以在合并多个签入到源代码控制时大大减少diff工具中令人讨厌的错误差异。

哦,我喜欢好工具!

选择单词:Ctrl+W

我不能没有这条捷径。每天使用超过100+(或200+)。

Ctrl + -和相反的Ctrl + Shift + -。

将光标向后(或向前)移动到它所在的最后一个位置。不再需要向后滚动或PgUp/PgDown来查找您的位置。

这将在Visual Studio中切换打开窗口:

Ctrl + tab和相反的Ctrl + Shift + tab

莎拉·福特的博客上有一些很棒的建议、旅行和捷径。