How to unleash your coding skills with these Visual Studio Code keyboard shortcuts

John Champ on Mar 3, 2021 · 2 min read

Featured Image of How to unleash your coding skills with these Visual Studio Code keyboard shortcuts

If you are using the Visual Studio Code editor and would like to code faster, then check out the keyboard shortcuts we use in our every day coding sessions. You might find some that you are not aware of.

Shortcuts for your editor

1. CTRL/CMD + ,

Toggles the settings of the editor.

2. CTRL + `

Toggles the inline terminal which is great for running your development tasks or managing your servers.

3. CTRL/CMD + B

Toggles the sidebar, handy if you need more space.

4. CTRL/CMD + K, Z

If you need to focus on your code without any distractions, you can enter the zen mode with this shortcut. Hitting the ESC key twice can get you back to normal mode.

5. CTRL/CMD + W

You can easily close the file you are currently working on.

6. CTRL/CMD + P

It opens up the overlay where you can search and open any file from your current project.

7. CTRL/CMD + SHIFT + P

It opens up the commands overlay, where you can search and run any of the available ones.

Shortcuts for your code

1. SHIFT + ALT + F

This will format and beautify your code in the whole document.

2. CTRL + LEFT/RIGHT ARROW

Holding down the CTRL key while using the arrow keys will enable you to move faster to the left or right since the text cursor will now move in words.

3. CTRL + SHIFT + LEFT/RIGHT ARROW

The same as before (holding down CTRL and SHIFT keys) but now you will select the text as you use the arrow keys.

4. CTRL/CMD + /

It will comment or uncomment the line or the selected text based on the language you are using.

5. CTRL/CMD + [

Outdents your line or your selection.

6. CTRL/CMD + ]

Indents your line or your selection.

7. CTRL/CMD + ALT + UP/DOWN ARROW

It can be used to add new text cursors up or down respectively based on the arrow key you use. Pretty helpful for using multiple text cursors to edit various parts of your code at the same time.

8. ALT + LEFT MOUSE BUTTON

By holding down the ALT key, you can click wherever you want to add new cursors in your document.

9. SHIFT + ALT + UP/DOWN ARROW

Use it to easily copy your current line or selection up or down respectively.

10. CTRL + SPACE (Mac: ALT + ESC)

Brings up the autocomplete dropdown on demand.

11. CTRL + G

You can use it to navigate directly to a specific line of your document.

12. CTRL/CMD + D

It selects the whole word.

13. CTRL/CMD + SHIFT + L

It selects all instances of your current selection. This is really handy and we're using it a lot to quickly edit multiple classes in the same document.

That's it!

We hope you found these keyboard shortcuts helpful and discovered a couple of new ones. As soon as you start using them, you will be able to code easier and faster.

Would you like to let you know about any new posts? Join us and also get our carefully designed UI resources.

No spam, ever. Unsubscribe at any time.
Check out our Privacy Policy

If you liked this post, show us some