
If you find yourself repeatedly performing a certain command, assign it to a keyboard shortcut. Note that you can browse or customize all Visual Studio commands and keybindings from the Options dialog (Alt+T, O, K). These commands cover most of my daily usage of Visual Studio. Place the caret in a method body to run a single test or in a class to run the tests from that class. With VS 2015 improvements to EnC, you can fix more types of errors without having to stop to rebuild your code. The debugger is one of Visual Studio’s best features. If you detach from a process that started without debugging, it will keep executing. Useful after Ctrl+F5 or when you need to attach to something that’s already running. For larger solutions, it’s more efficient for me to manually restore when needed instead of performing the nuget checks on every build. If the caret is at the ‘|’ in `Console.Writeline(Foo(4|))`, Shift+Enter will add the trailing semicolon and put the caret on the next line. This one gets more useful with every release.

Show available refactorings or generate code with consume-first development. Use F8 and Shift+F8 to cycle through results. You can get a live preview for matches on regular expressions! Use with Shift for find in files. Matches braces, parentheses, html tags, etc. Why format the selection when you can format the whole document by using D instead of F? Like most other Visual Studio commands, these will apply to the current line if there is no active selection. Hold down the Ctrl key while selecting text to auto-select whole words instead of using the default character boundary.

Also works with the mouse instead of arrow keys. add `readonly` to a list of field declarations. Paste/Cycle Clipboard Ring (Ctrl+Shift+V)ĭid you get carried away with Ctrl+X and lose what you had on the clipboard? Use Ctrl+Shift+V to paste the previous clipboard contents.īox editing lets you apply the same edit to multiple lines simultaneously, e.g. Show IntelliSense info without having to type a character, open paren, etc.Ĭut/Copy apply to the current line if there is no active selection.ġ3. Search for available commands, options, and tool windows. Navigate to classes, methods, files, etc. Alternatively, you can get a second monitor and drag the document out of the tab well to keep it visible.

These two commands are great for quickly moving the cursor back and forth between its most recent locations.īookmarks are useful for saving a location that you need to refer back to often. I included the default keyboard bindings from the General profile where appropriate. I use most of these daily, but the less common ones are nice to fall back on in specific situations. I’ve been using Visual Studio as my primary code editor since 2008, and I put together a list of the top commands I use in VS 2015.
