.net 最喜欢的 Visual Studio 键盘快捷键

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

Favorite Visual Studio keyboard shortcuts

.netvisual-studiokeyboard-shortcuts

提问by Adam Neal

What is your favorite Visual Studio keyboard shortcut? I'm always up for leaving my hands on the keyboard and away from the mouse!

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

Oneper answer please.

一个答案。

回答by Glennular

Ctrl+ -and the opposite Ctrl+ Shift+ -.

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

Move cursor back (or forwards) to the last place it was. No more scrolling back or PgUp/PgDownto find out where you were.

将光标向后(或向前)移动到它的最后位置。不再向后滚动或PgUp/PgDown以找出您所在的位置。

This switches open windows in Visual Studio:

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

Ctrl+ taband the opposite Ctrl+ Shift+ tab

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

回答by Pablo Marambio

For me, it's nothing to do about auto completing code, matching parenthesis or showing some fancy tool panel. Instead, it's just about letting me see the code.

对我来说,自动完成代码、匹配括号或显示一些花哨的工具面板无关紧要。相反,它只是让我看到代码。

With all the panels surrounding you, the area you use to actually write code becomes too small.

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

In this cases, Shift+Alt+Entercomes in to the rescue and gets the code window in focus in full screenmode. Hit it again, and you have all the panels back.

在这种情况下,Shift+ Alt+Enter进来救援和获得处于焦点的代码窗口中的全屏幕模式。再次击中它,您就可以恢复所有面板。

回答by Dara Kong

Incremental Search - Ctrl+ I

增量搜索 - Ctrl+I

It's basically the find dialog box without the dialog box. Just start typing what you want to search for (look at the bottom status bar location to see what you've typed). Pressing Ctrl+ Iagain or F3searches for the next instance. Press Escape to quit. Starting a new search by pressing Ctrl+ Itwice repeats the last search.

它基本上是没有对话框的查找对话框。只需开始输入您要搜索的内容(查看底部状态栏位置以查看您输入的内容)。再次按Ctrl+IF3搜索下一个实例。按退出退出。按Ctrl+I两次开始新搜索会重复上次搜索。

回答by Ray

Expand Smart Tag (Resolve Menu): Ctrl+ .(period)

展开智能标签(解析菜单):Ctrl+ .(句号)

Expands the tag that shows when you do things like rename an identifier.

展开在您执行重命名标识符等操作时显示的标签。

回答by Ray

Ctrl+K, Ctrl+CComment a block

Ctrl+K, Ctrl+UUncomment the block

Ctrl+ K, Ctrl+C注释块

Ctrl+ K, Ctrl+U取消注释块

回答by moobaa

Stock Visual Studio? F12- Edit.GoToDefinition.

股票 Visual Studio?F12- Edit.GoToDefinition

Having DevExpress' Refactor! installed means that Ctrl+ `is my all-time fave, though ;)

拥有 DevExpress 的重构!已安装意味着Ctrl+`是我一直以来的最爱;)

回答by nzpcmad

The TABkey for "snippets".

TAB“片段”的关键。

E.g. type tryand then hit the tab key twice.

例如,键入try然后按两次 Tab 键。

Results in:

结果是:

try 
{           

}
catch (Exception)
{

    throw;
}

which you can then expand.

然后你可以扩展。

Full list of C# Snippets: http://msdn.microsoft.com/en-us/library/vstudio/z41h7fat.aspx

C# 片段的完整列表:http: //msdn.microsoft.com/en-us/library/vstudio/z41h7fat.aspx

回答by Mark Cidade

Ctrl+]for matching braces and parentheses.

Ctrl+]用于匹配大括号和圆括号。

Ctrl+Shift+]selects code between matching parentheses.

Ctrl+ Shift+]匹配括号之间的选择的代码。

回答by Rob

Ctrl+Shift+F

Ctrl+ Shift+F

Good old Find In Files.

好老的在文件中查找

回答by Poorna

Ctrl+Space, Visual Studio gives the possible completions.

Ctrl+ Space,Visual Studio 给出了可能的补全。