30 Favorite Visual Studio Keyboard Shortcuts

Here is a list of my favorite Visual Studio Keyboard Shortcuts that I use all the time to increase my productivity and perform repetitive tasks with ease. I have tested these shortcuts on VS 2010, but most of them work on VS 2008 too. You can bookmark this link and make them your favorites too!

Note: I am using the US Keyboard Layout!

Navigation Shortcuts

Ctrl + ]Moves the cursor to the matching brace in the source file
Ctrl + Hyphen (-) Moves cursor to its previous position
Ctrl + Shift + Hyphen (-)Moves cursor to the next browsed line of code
Shift + F7Switch between the Design and Source View of the document
Ctrl + TabDisplays the IDE Navigator with the current document selected. Allows you to navigate open documents. Also try Alt+W+2
Ctrl + Shift + FDisplays the ‘Find in Files’ tab of the ‘Find and Replace’ dialog box
Ctrl + IActivates Incremental Search by searching for the next occurrence of the input text. You can even use F3
Shift + F12Displays a list of all references for the symbol selected
Ctrl + /Moves focus to the Find/Command box

Editing Shortcuts

Ctrl + K + CComment a Line or an entire selected block
Ctrl + K + UUncomment a Line or an entire selected block
Ctrl + LCuts the current line
Ctrl + C, Ctrl + V Duplicate a line

Window Shortcuts

Shift + Alt + Enter Toggle Full Screen Mode
Ctrl + M + OCollapses all Regions to provide a high level overview of the types and members in the source file
Ctrl + M + LToggles all previously collapsed Regions
/Collapses all tabs in a Toolbox
*Expands all tabs in a Toolbox. If * does not work, use Shift + 8 for ENU keyboards as explained here
Shift + EscCloses the current Tool Window with focus

Code Completion Shortcuts

Ctrl + Period (.) Expands the Smart Tag Menu (Usually when you rename a method or need to add a ‘using’ statement). You can also use Alt+Shift+F10
Tab Inserts expanded code snippet using a shortcut (for example enter the keyword ‘class’ and hit Tab twice)
Ctrl + SpaceCompletes the current word in the completion list

Other Shortcuts

Ctrl + Shift + BBuild the solution. You can even try F6
F5Start the application with Debugging
Ctrl + F5Start the application without Debugging
F9Sets or Removes a breakpoint at the current line
Ctrl + Shift + SSave all unsaved files
Ctrl + Alt + LShow Solution Explorer
Ctrl + Shift + ADisplays the Add New Item dialog box
Alt + Shift + ADisplays the Add Existing Item dialog box

You can also download the Visual Studio 2010 Keyboard Shortcuts Poster

Will you give this article a +1 ? Thanks in advance

About The Author

Suprotim Agarwal
Suprotim Agarwal, ASP.NET Architecture MVP (Microsoft Most Valuable Professional) works as an Architect Consultant and provides consultancy on how to design and develop Web applications.

Suprotim is also the founder and primary contributor to DevCurry, DotNetCurry and SQLServerCurry. He is the Editor of a Developer Magazine called DNC Magazine. He has also written two EBooks 51 Recipes using jQuery with ASP.NET Controls. and The Absolutely Awesome jQuery CookBook

Follow him on twitter @suprotimagarwal


10 Responses to "30 Favorite Visual Studio Keyboard Shortcuts"
  1. Anonymous said...
    June 9, 2010 at 8:31 AM

    Don't forget these indispensable debugging shortcuts:

    F9 set/clear breakpoint
    F10 step next
    F11 step into
    Shift+F11 return current function
    F5 continue
    Shift+F6 stop execution

    Alt+4 Variables
    Alt+7 Call Stack

  2. Francesco Biacca said...
    June 9, 2010 at 8:42 AM

    very useful!
    just a note: you should underline that they work on us config.

    For example, if you guys use the italian versione, you have to

    ctrl + ì

    to go to the matching brace

  3. Anonymous said...
    June 9, 2010 at 8:48 AM

    One of my personal favorites:

    Ctrl + K, Ctrl + D

    ...for auto-formatting messy code / html.

    Also Ctrl + K, Ctrl + K for setting code bookmarks.

  4. Suprotim Agarwal said...
    June 9, 2010 at 12:48 PM

    Francesco: Thanks! I have added a note.

    Other: Thanks for your comments

  5. blog said...
    June 9, 2010 at 7:20 PM

    CTRL + L is a winner!

  6. Anonymous said...
    January 19, 2011 at 4:52 PM

    Ctrl + ] is the most usefull thingi have learnt all year thanks

  7. Anonymous said...
    January 25, 2011 at 4:52 AM

    My favorite keyboard shortcut in C# keyset is Ctrl+E,D. I found the keyboard shortcuts here first:

  8. Pavel Vladov said...
    December 11, 2012 at 5:51 AM

    Here's my favourite list of The Most Useful Visual Studio Keyboard Shortcuts.

  9. Anonymous said...
    December 11, 2012 at 11:40 PM

    don't forget:
    Ctrl+R, Ctrl+R

    this is for doing a rename that will act also on comments

  10. Jw said...
    December 11, 2014 at 12:33 PM

    While debugging:

    Shift + F9: Open Quick Watch with editor selected content

    Alt + NumPad *: Jump cursor in editor to current debugging line


Copyright © 2009-2016 All Rights Reserved for DevCurry.com by Suprotim Agarwal | Terms and Conditions