
This is the hotkey for the back and forward buttons Navigate Forward/Backward Ctrl+–/Ctrl+Shift+–įorgot the previous location of your cursor? Don’t worry.You can bulk comment and uncomment by using this shortcut. Comment/Uncomment block of code Ctrl+K+C/Ctrl+K+U.Sometimes you would want to hide the annoying code that is blocking your view or distracting you, use this then.

Collapse/Expand selection Ctrl+M+H/Ctrl+M+U.They do all with their precious keystrokes combined with Shift, Ctrl, and Alt, Is’nt it? And who wouldn’t like shortcuts after all?įor those people who use Visual Studio to write code, behold I present you few of my favorite and best shortcuts that can be used while writing and managing code. Sometimes I used to wonder how the system administrators are very fast in setting up things, restarting a crashed network, etc. It is found that you could be more efficient and appear smarter if you use shortcut keys rather than doing things with the mouse. Visualizing the code coverage results from Azure Pipelines in Visual Studio.Visual Studio Tips and tricks: Add project reference using drag & drop.Visual Studio Tips and tricks: Paste as JSON.Visual Studio Tips and tricks: Open the documentation of a symbol.Visual Studio Tips and tricks: Default startup project.Visual Studio Tips and tricks: Find the current opened file in the solution explorer.Visual Studio Tips and tricks: Regex editing.Visual Studio Tips and tricks: Undock/Re-dock a tool window.Visual Studio Tips and tricks: Extend/Reduce selection (this post).Visual Studio Tips and tricks: Multi-line and multi-cursor editing.Visual Studio Tips and tricks: Open recently closed files.Visual Studio Tips and tricks: Clipboard history.View and edit the Tab Order of Windows Forms Controls.Be sure to check out the rest of the blog posts of the series! This post is part of the series 'Visual Studio Tips and Tricks'.

You can also select the containing block using ALT+SHIFT+] Press Alt+Shift+= to extend the selection and Alt+Shift+- reduce the selection: For instance, if your cursor is in a string, you can select the whole string in a single shortcut. You often need to extend the selection to the parent context.
