My Top 5 Keyboard Shortcuts for Visual Studio

Nick Boober
3 min readSep 29, 2019

--

Programmers are often considered lazy. Not necessarily because they don’t want to do something but because they are efficient at what they do. As a beginner, something that is often times overlooked with programming are the keyboard commands that make coding easier and more efficient.

During my time with coding I have picked up many shortcuts to help me be efficient with how I code. These are my top 5 keyboard shortcuts for Visual Studio.

  1. Select all occurrences of a current selection

Windows: Ctrl+Shift+L

Mac: ⇧⌘L

How many times have you gone through typing up your code and once you were done there were errors because multiple variables should have been singular and you made them plural? Instead of going through each misspelled instance of that word one at a time, I use this command to select all the words that match the selected word and change them all at the same time. This trick has come in handy for me plenty of times.

This one also kinda goes hand in hand with the selecting shortcut I use. If you use Shift + left or right on the direction pad you can select words letter by letter.

2. Typing on Multiple Lines at Once

Windows: Shift + Alt + ↑ / ↓

Mac: Alt + ⌘ + ↑ / ↓

This shortcut is somewhat similar to my number 1 shortcut. But instead of finding multiple words and changing them we are just manipulating multiple lines. In instances where you know you will need to type multiple of the same thing this keyboard shortcut comes in handy. This shortcut can also be used on different positions in different lines. By pressing Alt and using the mouse to click, you can place these markers any where you want.

3. Move line up/down
Windows: Alt+ ↑ / ↓

Mac: ⌥↓ / ⌥↑

Errors, errors, errors. I have used this many times because I may have put a line of code in the wrong block, or maybe I put a testing object in the wrong order. Either way instead of copying and pasting code, this shortcut allows the user to see exactly where the code is moving to line by line.

4. Copy line up/down
Windows: Shift+Alt + ↓ / ↑

Mac: ⇧⌥↓ / ⇧⌥↑

This shortcut allows the user to copy and paste lines of code very quickly above or below the selected line. This shortcut is also good for repeating similar lines of code as many times as you need. In this instance the first line has already been created, it is just being copied and pasted as many times as desired. Unlike my number 2 shortcut where all the lines are typed out at the same time.

5. Showing/Hiding the Integrated Terminal

Windows: Ctrl+`

Mac: ⌃`

This shortcut is simple but still very useful. I have closed my integrated terminal many time either on purpose or on accident when using Visual Studio. Instead of going into your options to find the terminal menu and open it back up. This simple command is a lot easier and quicker to get your terminal back up and running.

--

--