你最喜欢的Visual Studio快捷键是什么?我总是把我的手放在键盘上,远离鼠标!
请回答一个问题。
你最喜欢的Visual Studio快捷键是什么?我总是把我的手放在键盘上,远离鼠标!
请回答一个问题。
当前回答
我沉迷于http://blog.jpboodhoo.com/UsefulVSKeySequencesShortcuts.aspx的一些非常微妙的东西
例如,Alt-W U在全屏模式下,当内容太多时,可以自动折叠所有内容
其他回答
Shift + ESC
这将隐藏/关闭Visual Studio中的任何“假窗口”窗口。这包括解决方案资源管理器、对象浏览器、输出窗口、即时窗口、单元测试窗口等,无论它们是固定的、浮动的、可停靠的还是选项卡的,都仍然适用。
用快捷键进入一个窗口(例如,Ctrl + Alt + L或Ctrl + Alt + I)做你需要做的事情,并Shift + Esc来摆脱它。如果你不摆脱它,唯一的方法让它再次聚焦是使用相同的键盘快捷键(或鼠标,这是我们试图避免的....)
一旦你掌握了窍门,它就非常有用。
叽阿…在我发现这个之前,按Ctrl + F4关闭“窗口”只看到我当前的代码窗口关闭的次数是疯狂的,现在它只偶尔发生。
格式的文档
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.
一个我经常使用但很少有人使用的方法是:
Shift + Alt + F10然后回车
如果你输入一个类名,如Collection<string>,并且没有正确的名称空间导入,那么这个快捷组合将自动插入导入(而斜线符号紧跟在'>'之后)。
更新:
从这个答案的评论中有一个等效的快捷方式(感谢asterite!):
按下Ctrl +。
比我最初推荐的舒服多了。
雷说的。Ctrl + ..
我真的不喜欢智能标记(那些看起来想要帮助你的蓝色和红色下划线),直到我发现你不需要浪费时间试图将鼠标悬停在菜单显示的精确像素上。
我认为是Ctrl +。打开智能标签菜单每天为我节省了大约5分钟,并大大降低了我的血压。
Ctrl + -和相反的Ctrl + Shift + -。
将光标向后(或向前)移动到它所在的最后一个位置。不再需要向后滚动或PgUp/PgDown来查找您的位置。
这将在Visual Studio中切换打开窗口:
Ctrl + tab和相反的Ctrl + Shift + tab