Hari’s Favorite Visual Studio Shortcuts

I’ve always wanted to write a blog post containing my favorite Visual Studio keyboard shortcuts. However, this guy beat me to it. But that’s okay because I learned a few tricks that I didn’t know.

Of course there many useful shortcuts than the six he mentioned. Here are some that I use all the time:

  • ctrlleft bracket + s to show the current file in the solution explorer.
  • ctrlk + ctrld to format the whole file.
  • ctrlm + ctrlo to collapse to definitions.
  • ctrlm + ctrll to collapse or expand the whole file.
  • Cut or Copy without making a selection to cut/copy the whole line. Useful for removing blank lines too.
  • F12 to find definition of what’s at the insertion point (you don’t even have to select it).
  • shiftF12 shows all the places a symbol is used (again, you don’t have to select the word).
  • ctrldashto go back, ctrlshiftdash to go forward.
  •  During debugging, use the following keyboard shortcuts:
    • F10 to step (without going into calls).
    • F11 to step (going into calls when possible).
    • shift + F11 to execute the rest of a method that you stepped into.
    • F9 to toggle a breakpoint.
    • ctrl + F10 run to insertion point.
    • ctrlshiftF10 to “drag” the program counter to the insertion point.

What are some of your favorite Visual Studio productivity tips?


Photo credit:  jeroen_bennink via Flickr cc

Related posts