你最喜欢的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+C, Ctrl+V复制当前行 按Ctrl+L删除当前行 按Ctrl+F3搜索当前选择 Ctrl+K, Ctrl+K创建书签(这很有用) Ctrl+K, Ctrl+N转到下一个书签

还有更有趣的事情: 按“Ctrl+/”将光标放入可以输入命令的框中。 例如,按Ctrl+/并输入“>of”,现在开始输入项目中的文件名,它将自动完成。这是在当前解决方案中打开文件的一种非常快速的方法。

库存Visual Studio?F12 - Edit.GoToDefinition。

拥有DevExpress的重构!不过,installed意味着Ctrl + '是我一直以来的最爱;)

片段

每个片段都有一个快捷方式,您可以通过输入单词然后按tab键来访问。我用得最多的是标准属性定义;只需输入属性,然后输入制表符。

对我来说,它不涉及自动补全代码、匹配括号或显示一些花哨的工具面板。相反,它只是让我看到代码。

由于所有的面板都围绕着您,您实际用于编写代码的区域变得太小了。

在这种情况下,Shift+Alt+Enter可以起到拯救作用,使代码窗口以全屏模式聚焦。再按一次,所有的面板就都回来了。

Alt+Shift+方向键(←↑↓→)或鼠标移动=选择块/列

真的很方便