visual-studio 你在visual studio中最常用的快捷键是什么?

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

What are your most frequently used shortcut keys in visual studio?

visual-studiovisual-studio-2008

提问by MainID

Recently , I found some shortcut key really helpful which I never used before . Such keys like F7,F3,Ctrl+ghelp me a lot when editing and debuging. What are your most frequently used shortcut keys in visual studio?

最近,我发现一些我以前从未使用过的快捷键非常有用。F7, F3, Ctrl+这样的键g在编辑和调试时对我有很大帮助。你在visual studio中最常用的快捷键是什么?

采纳答案by John Sheehan

Ctrl+ .for bringing up the smart tag for adding namespaces, renaming/refactoring, etc.

Ctrl+.用于调出用于添加命名空间、重命名/重构等的智能标记。

I also remapped Ctrl+ Bto build, Ctrl+ Shift+ Pto Build Selection (in a sense, Build Project) and Ctrl+ Wto close window.

我也重新映射Ctrl+B打造,Ctrl+ Shift+P构建的选择(在一定意义上,生成项目)和Ctrl+W来关闭窗口。

回答by orip

including Resharper's shortcuts:

包括 Resharper 的快捷方式:

  • Ctrl-Shift-B(build)
  • F12(go to definition)
  • Shift-F12(find usages)
  • Ctrl--(go to last location)
  • Alt-Shift-L(go to current file in the solution explorer)
  • Alt-\(find member)
  • Ctrl-T(find type)
  • Ctrl-Shift-T(find file)
  • Shift-Esc(close current dialog)
  • Ctrl-Shift-S(save all files - VS tends to forget)
  • Ctrl- Shift- B(构建)
  • F12(转到定义)
  • Shift- F12(查找用法)
  • Ctrl- -(去最后一个位置)
  • Alt- Shift- L(转到解决方案资源管理器中的当前文件)
  • Alt- \(找会员)
  • Ctrl- T(查找类型)
  • Ctrl- Shift- T(查找文件)
  • Shift- Esc(关闭当前对话框)
  • Ctrl- Shift- S(保存所有文件-VS容易忘记)

EDIT: added explanations

编辑:添加解释

回答by Andy

I always use the debugging keyboard shortcuts - F9(toggle breakpoint), F10(step over) and F11(step into). I can't believe that some of my coworkers actually use the toolbar buttons for this - it's insanely more efficient to use the shortcuts.

我总是使用调试键盘快捷键 - F9(toggle breakpoint), F10(step over) 和F11(step into)。我不敢相信我的一些同事实际上为此使用了工具栏按钮 - 使用快捷方式效率更高。

回答by John_

Standard VS keys of F12for going to the definition and then CTRL+-to go back to where I was before that.

F12用于转到定义的标准 VS 键,然后使用CTRL+-返回到我之前所在的位置。

Probably the two shortcuts that get me around VS and my code quicker than any other.

可能是让我更快地了解 VS 和我的代码的两个快捷方式。

回答by M4N

The most used keyboard shortcut is Ctrl-Tabto switch between tabs.

最常用的键盘快捷键是Ctrl-Tab在选项卡之间切换。

Another one I use alot is Ctrl-Ito start incremental search.

我经常使用的另一个是Ctrl-I开始增量搜索。

回答by Arjan Einbu

CTRL+KCTRL+Cfor comment selection and CTRL+KCTRL+Ufor uncomment selection (They may be mapped to CTRL+ECTRL+Cand CTRL+ECTRL+Cin some standard keyboard mappings, but the first two will generally still work...)

CTRL+ KCTRL+C对此事发表评论的选择和CTRL+ KCTRL+U的注释去掉选择(它们可以被映射到CTRL+ ECTRL+CCTRL+ ECTRL+C在某些标准键盘映射,但前两种一般会仍然工作...)

回答by Arjan Einbu

Two more:

还有两个:

  • Alt+Ctrl+Cfor Call Stack
  • Alt+Ctrl+Ifor Immidiate window
  • Alt+ Ctrl+C的调用堆栈
  • Alt+ Ctrl+I用于立即窗口

(Both helpful while debugging)

(在调试时都有帮助)

回答by Alex

Ctrl+Shift+F9to delete all the break points in a solution. Very handy when people leave them spattered all over the solution!

Ctrl+ Shift+F9删除解决方案中的所有断点。当人们把它们洒在解决方案上时非常方便!

回答by Makach

I use many, but most useful I think is CTRL+KKfor setting a bookmark and CTRL+KNfor going to next bookmark and CTRL+KPfor previous

我使用了很多,但我认为最有用的是 CTRL+KK用于设置书签和CTRL+KN用于转到下一个书签和CTRL+KP用于上一个

回答by Makach

Shift+ F6to build current project, Shift+F5to stop debugging

Shift+F6构建当前项目,Shift+F5停止调试