Microsoft Visual Studio is one of the best Integrated Development Environments (IDEs) available and as such it dramatically boosts the productivity of the programmers who use it. You can find many articles over the Internet that show you how to boost your productivity even more. One of the ways to do so is to take advantage of the keyboard shortcuts in Visual Studio. Unfortunately, most of the articles present hundreds of Visual Studio keyboard shortcuts, which is impossible for one to remember. Do you wonder which ones of them are the most useful and worth remembering? If yes, read on...
Take a look at the list below to see the most useful Visual Studio keyboard shortcuts professional developers use every day to boost their productivity.
- Editing Keyboard Shortcuts
Alt + Left Mouse Button Drag Vertically selects text, you can then type the new text to replace the selected one Ctrl + Left Arrow Moves to previous word Ctrl + Right Arrow Moves to next word Ctrl + Enter Inserts new line above the current line Ctrl + Left Mouse Button Click Selects the clicked word Ctrl + Shift + Left Arrow Selects the previous word Ctrl + Shift + Right Arrow Selects the next word Ctrl + Shift + Home Selects the text from the beginning of the document to the current position Ctrl + Shift + End Selects the text from the current position to the end of the document Shift + Home Selects the text from the start of the current line to the current position Shift + End Selects the text from the current position to the end of the current line Shift + Tab Decreases the indentation of the current line or the currently selected text Tab Increases the indentation of the current line or the currently selected text
- Find, Replace and Navigation Keyboard Shortcuts
Ctrl + F Quick Find - lets you quickly find a string in the currently opened document Ctrl + H Quick Replace - lets you quickly replace one, several or all occurrences of a string in the currently opened document with another one Ctrl + Shift + F Find in Files - lets you find all occurrences of a given string in a set of files Ctrl + Shift + H Replace in Files - lets you replaces one, several or all occurrences of a string in a set of files Ctrl + Comma Provides search-as-you-type support for files, types and members. The search is very fast, which makes this feature invaluable for large projects. It is case sensitive if the input string contains uppercase letters and case insensitive otherwise. Ctrl + G Navigates to a given line number in the currently opened document
- Refactoring Keyboard Shortcuts
Ctrl + Dot Shows a handy refactoring menu when you have renamed an identifier or you are on an identifier that requires a new "using" directive Ctrl + R + R Allows you to rename the element under the text caret, automatically doing all the needed refactoring Ctrl + U Converts the currently selected text to lower case Ctrl + Shift + U Converts the currently selected text to upper case Ctrl + E + D Formats the current document
- Outlining Keyboard Shortcuts
Ctrl + M + O Collapses the document to definition (i.e. collapses regions, properties, methods, comments, etc.) Ctrl + M + L Toggles all outlining. Press it once to expand all outlining and once more to collapse it. Ctrl + Shift + U Converts the currently selected text to upper case
- Compiling, Execution and Debugging Keyboard Shortcuts
Ctrl + Shift + B Builds the solution Ctrl + F5 Starts the project without debugging F5 Starts the project with debugging support or continues execution from the given breakpoint to the next one F9 Toggles (inserts/removes) a break point at the current line F10 Executes the line of code after the current break points and stops execution there F11 Steps into the code called by the currently executing line of code
I hope you find this list useful. Do you have any other favourite Visual Studio Keyboard Shortcuts?