Visual Studio Keyboard Shortcuts

27 September 2018

Here we have listed best short cuts that you need to know about the Visual Studio.

=> Move Code Alt+Up/Down

If you put the cursor on a line of code and use the Alt+Up Arrow keys, the line of code you’ve selected moves up. If you use the Alt+Down Arrow keys, the line of code selected moves down. You can easily move your code without doing Copy and Paste.

=> Comment Code Block Ctrl+K+C/Ctrl+K+U

Whether want to comment and uncomment blocks of code. If you select a block of code and use the key sequence Ctrl+K+C, you’ll comment out the section of code. Ctrl+K+U will uncomment the code.

=> Peek Definition Alt+F12

When you’re going through your code and you want to examine the code in the method you’re calling, many programmers will use the F12 key or the pop-up menu option Go To Definition. Go To Definition will navigate to the called method; however, many times you don’t need to navigate to the code. Sometimes, you just want a quick look at the method. If you’ve installed Visual Studio 2013, there’s a new keyboard shortcut — Alt+F12 — that will give you a preview of the method being called inline. You can use the Esc key to close the preview.

Leave a Comments