HI WELCOME TO SIRIS

Visual Studio Useful Keyboard Shortcut Keys

Shortcut keys play an important role to increase the output. Developers work at least 6 to 8 hours on daily basis on Visual Studio. If the developer knows the shortcut keys, he can keep away from using of mouse and absolutely it will enhance productivity and reduce headache to use of mouse again and again. I am sharing some interesting and useful shortcut keys to work with Visual Studio.

General Shortcut Keys

Shortcut
Description
Ctrl-X or Shift-Delete or Ctrl-L
Cuts entire line or Cuts the currently selected item to the clipboard
Ctrl-Del
Delete next "word"
Ctrl-C or Ctrl-Insert
Copies the currently selected item to the clipboard
Ctrl-V or Shift-Insert
Pastes the item from the clipboard at the cursor location
Ctrl-Z or Alt-Backspace
Undo the previous editing action
Ctrl-Space
To see intelligence dialog
Ctrl-Y or Ctrl-Shift-Z
Redo the previous undo action
Ctrl-S
Saves the current selected file
Ctrl-Shift-S
Saves all files and projects
Ctrl-P
Displays the Print dialog
F7
Switches from the design view to the code view in the editor
Shift-F7
Switches from the code view to the design view in the editor
Shift-F8 or F8
Navigate to compile time errors
Alt-Shift-A
Add Existing Item(file) to selected project
Ctrl-Shift-A
Add New Item(file) to selected project
Shift-F9
Display the selected item quick output means contains value while debugging
F12
Moves the cursor to the selected method, variable, class definition.
Shift-F12
Finds the reference to the selected method, variable, class or the item under the cursor
Ctrl-}
Match curly braces, brackets or compiler directives
Ctrl-Shift-}
Select text between matched braces, brackets or compiler directives

Text Manipulation

Shortcut
Description
Tab
Indents the currently selected line or lines by one tab stop. If there is no selection, this inserts a tab stop
Tab-Tab
Complete the syntax of an item. Example- Write for and now press Tab-Tab, then for loop syntax will be automatically completed. Similarly it works for property, index, class syntax.
Shift-Tab
Moves current line or selected lines one tab stop to the left
Backspace or Shift-Backspace
Deletes one character to the left of the cursor
Ctrl-K, Ctrl-C
Marks the current line or selected lines of code as a comment, using the correct comment syntax for the programming language
Ctrl-K, Ctrl-U
Removes the comment syntax from the current line or currently selected lines of code
Ctrl-K, Ctrl-D
Do proper alignment of all the code of design view and code view
Ctrl-T or Shift-Enter
Swaps the characters on either side of the cursor. (For example, AC|BD becomes AB|CD.) Available only in text editors
Ctrl-U
Changes the selected text to lowercase characters
Ctrl-Shift-U
Changes the selected text to uppercase characters
Ctrl-Shift-Right Arrow
Select the entire word with space from start to end
Ctrl-Right Arrow
Move the cursor in forward direction word by word
Shift-End
Select the entire line from start to end
Shift-Home
Select the entire line from end to start
Shift-Alt-Arrows or Alt-Mouse
Column wise text selection for text manipulation
Ctrl-Delete
Deletes the word to the right of the cursor
Ctrl-Backspace
Deletes the word to the left of the cursor
Ctrl-G
Jump to line number or go to line

Project Related

Shortcut
Description
Ctrl-Shift-B
Builds the solution
Ctrl-N
Displays the New File dialog. Note: files created this way are not associated with a project. Use Ctrl-Shift-A to add a new file in a project
Ctrl-Shift-N
Displays the New Project dialog
Ctrl-O
Displays the Open File dialog
Ctrl-Shift-O
Displays the Open Project dialog
Ctrl-M-O
Collapse all the methods, classes, regions in the current code behind or class file
Ctrl-M-P or Ctrl-M-L
Expands all the methods, classes, regions in the current code behind or class file
Ctrl-F
Displays the Find dialog
Ctrl-H
Displays the Replace dialog
Ctrl-Shift-F
Find the reference of selected item into entire solution.
Ctrl-Tab
Move from one opened file to another opened file in visual studio.
F9
Sets or removes a breakpoint at the current line
Ctrl-F9
Enables or disables the breakpoint on the current line of code. The line must already have a breakpoint for this to work
F5
Runs the code with invoking the debugger.
Ctrl-F5
Runs the code without invoking the debugger.
F4 or Alt-Enter
Displays the Properties window, which lists the design-time properties and events for the currently selected item
Ctrl-Alt-S
Displays the Server Explorer window, which allows you to view and manipulate database servers, event logs, message queues, web services, and many other operating system services
Ctrl-Alt-L
Displays the Solution Explorer, which lists the projects and files in the current solution
Ctrl-Alt-X
Displays the Toolbox, which contains controls and other items that can be dragged into editor and designer windows
Ctrl-Alt-I
Displays the Immediate window, where you can find the controls or variables values or can do data manipulation during debugging