Visual Studio Keyboard Shortcuts

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 + F7 Switch between the Design and Source View of the document
Ctrl + Tab Displays the IDE Navigator with the current document selected. Allows you to navigate open documents. Also try Alt+W+2
Ctrl + Shift + F Displays the ‘Find in Files’ tab of the ‘Find and Replace’ dialog box
Ctrl + I Activates Incremental Search by searching for the next occurrence of the input text. You can even use F3
Shift + F12 Displays a list of all references for the symbol selected
Ctrl + / Moves focus to the Find/Command box

Editing Shortcuts
Ctrl + K + C Comment a Line or an entire selected block
Ctrl + K + U Uncomment a Line or an entire selected block
Ctrl + L Cuts the current line
Ctrl + C, Ctrl + V Duplicate a line
Window Shortcuts
Shift + Alt + Enter Toggle Full Screen Mode
Ctrl + M + O Collapses all Regions to provide a high level overview of the types and members in the source file
Ctrl + M + L Toggles 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 + Esc Closes 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 + Space Completes the current word in the completion list

Other Shortcuts

Ctrl + Shift + B Build the solution. You can even try F6
F5 Start the application with Debugging
Ctrl + F5 Start the application without Debugging
F9 Sets or Removes a breakpoint at the current line
Ctrl + Shift + S Save all unsaved files
Ctrl + Alt + L Show Solution Explorer
Ctrl + Shift + A Displays the Add New Item dialog box
Alt + Shift + A Displays the Add Existing Item dialog box

Author:

Since March 2011, have 8+ years of professional experience on software development, currently working as Senior Software Engineer at s3 Innovate Pte Ltd.

Leave a Reply