Recently , I found some shortcut key really helpful which I never used before . Such keys like F7 ,F3 ,Ctrl+g help me a lot when editing and debuging. What are your most frequently used shortcut keys in visual studio?
-
1See this question: http://stackoverflow.com/questions/98606/favorite-visual-studio-keyboard-shortcuts – M4N Jan 21 '09 at 22:52
15 Answers
including Resharper's shortcuts:
- 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)
EDIT: added explanations
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.

- 702
- 5
- 12

- 30,088
- 6
- 78
- 89
-
2+ also Shift-F11 to step out of the current routine, and Shift-F5 to cancel execution. – Mike Dunlavey Jul 23 '13 at 13:33
Standard VS keys of F12 for going to the definition and then CTRL+- to go back to where I was before that.
Probably the two shortcuts that get me around VS and my code quicker than any other.

- 702
- 5
- 12

- 2,931
- 3
- 32
- 49
Ctrl + . for bringing up the smart tag for adding namespaces, renaming/refactoring, etc.
I also remapped Ctrl + B to build, Ctrl + Shift + P to Build Selection (in a sense, Build Project) and Ctrl + W to close window.

- 4,649
- 6
- 51
- 65

- 77,456
- 30
- 160
- 194
The most used keyboard shortcut is Ctrl-Tab to switch between tabs.
Another one I use alot is Ctrl-I to start incremental search.

- 702
- 5
- 12

- 94,805
- 45
- 217
- 260
CTRL+K CTRL+C for comment selection and CTRL+K CTRL+U for uncomment selection (They may be mapped to CTRL+E CTRL+C and CTRL+E CTRL+C in some standard keyboard mappings, but the first two will generally still work...)

- 13,543
- 2
- 56
- 59
Two more:
- Alt+Ctrl+C for Call Stack
- Alt+Ctrl+I for Immidiate window
(Both helpful while debugging)

- 7,603
- 6
- 44
- 104
CTRL+D and then ">of $filename" (open filename),
CTRL+K+C (comment selection),
CTRL+K+F (format),
CTRL+X and CTRL+C on a line to cut
or copy the entire line

- 38,117
- 9
- 79
- 111

- 6,711
- 32
- 46
-
See also http://www.chinhdo.com/20070920/top-11-visual-studio-2005-ide-tips-and-tricks-to-make-you-a-more-productive-developer/ – Ruben Bartelink Jun 26 '09 at 11:32
The list is endless. To maximize readble code space, I've removed all my toolbars. If I want to do it, I have to know the keyboard shortcut for it.
Aside from the basics, I constantly use things like Ctrl-M,O, Ctrl-K,C, Ctrl-K,U, Ctrl-K,D, Ctrl-Alt-E, Ctrl-Alt-P. I have also made a little smiley-face button for "Remove and Sort Usings" because navigating through the right-click menu takes too long and it doesn't have a hotkey that I know of.
-
You can run Visual Studio in fullscreen mode as well! I've hooked it up to F11. – Jasper Bekkers Jan 21 '09 at 23:04
-
You could always map a keyboard shortcut to Remove and Sort usings – John Sheehan Jan 21 '09 at 23:25
-
ALT e i o a... that navigates through the menu's via your keys to get to the Remove and Sort menu item. It's very quick to type. I use it all the time. – Seth Flowers Mar 19 '13 at 17:08
Ctrl+Shift+F9 to delete all the break points in a solution. Very handy when people leave them spattered all over the solution!
-
Ctrl-Alt-B to view the list and then you can selectively disble thme either – Ruben Bartelink Jun 26 '09 at 11:34
Ctrl + B which for me is build current project. I use it less in VS2008 SP1 with the error highlighting so Ctrl + D which for me is Go To Definition is starting to edge it out.

- 7,373
- 6
- 36
- 49

- 36,004
- 6
- 77
- 101
I never can remember shortcuts, but Ctrl + - . is one of the few I can remember and use often. With Resharper installed, Alt + Enter is Ctrl . on steroids. Both intelligently resolve a variety of errors or refactorings.

- 7,373
- 6
- 36
- 49

- 1,516
- 1
- 13
- 24
I use the bookmark shortcuts alot: Ctrl-K Ctrl-K to create a bookmark, Ctrl-K Ctrl-N to cycle through them.
Ctrl-Shift-B to build is probably the most executed though.

- 3,079
- 13
- 31
- 46

- 4,500
- 25
- 19