7

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?

jor
  • 2,058
  • 2
  • 26
  • 46
MainID
  • 29,070
  • 19
  • 57
  • 70
  • 1
    See this question: http://stackoverflow.com/questions/98606/favorite-visual-studio-keyboard-shortcuts – M4N Jan 21 '09 at 22:52

15 Answers15

15

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

Hulk1991
  • 3,079
  • 13
  • 31
  • 46
orip
  • 73,323
  • 21
  • 116
  • 148
12

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.

Heinrich Cloete
  • 702
  • 5
  • 12
Andy
  • 30,088
  • 6
  • 78
  • 89
5

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.

Heinrich Cloete
  • 702
  • 5
  • 12
John_
  • 2,931
  • 3
  • 32
  • 49
4

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.

hIpPy
  • 4,649
  • 6
  • 51
  • 65
John Sheehan
  • 77,456
  • 30
  • 160
  • 194
2

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

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

Heinrich Cloete
  • 702
  • 5
  • 12
M4N
  • 94,805
  • 45
  • 217
  • 260
2

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...)

Arjan Einbu
  • 13,543
  • 2
  • 56
  • 59
2

Two more:

  • Alt+Ctrl+C for Call Stack
  • Alt+Ctrl+I for Immidiate window

(Both helpful while debugging)

Fabrizio
  • 7,603
  • 6
  • 44
  • 104
1

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

Hans Kesting
  • 38,117
  • 9
  • 79
  • 111
Jasper Bekkers
  • 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
1

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.

Hulk1991
  • 3,079
  • 13
  • 31
  • 46
askheaves
  • 745
  • 1
  • 5
  • 9
1

I use many, but most useful I think is CTRL+K Kfor setting a bookmark and CTRL+K N for going to next bookmark and CTRL+K P for previous

Mwiza
  • 7,780
  • 3
  • 46
  • 42
Makach
  • 7,435
  • 6
  • 28
  • 37
1

Shift + F6 to build current project, Shift +F5 to stop debugging

Mwiza
  • 7,780
  • 3
  • 46
  • 42
1

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

Fabrizio
  • 7,603
  • 6
  • 44
  • 104
Alex
  • 34,776
  • 10
  • 53
  • 68
0

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.

Tshilidzi Mudau
  • 7,373
  • 6
  • 36
  • 49
ShuggyCoUk
  • 36,004
  • 6
  • 77
  • 101
0

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.

Tshilidzi Mudau
  • 7,373
  • 6
  • 36
  • 49
Daniel
  • 1,516
  • 1
  • 13
  • 24
0

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.

Hulk1991
  • 3,079
  • 13
  • 31
  • 46
Jim Petkus
  • 4,500
  • 25
  • 19