How to unleash your coding skills with these Visual Studio Code keyboard shortcuts
John Champ on Mar 3, 2021 · 2 min read

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
CTRL/CMD + ,
Toggles the settings of the editor.
CTRL + `
Toggles the inline terminal which is great for running your development tasks or managing your servers.
CTRL/CMD + B
Toggles the sidebar, handy if you need more space.
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.
CTRL/CMD + W
You can easily close the file you are currently working on.
CTRL/CMD + P
It opens up the overlay where you can search and open any file from your current project.
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
SHIFT + ALT + F
This will format and beautify your code in the whole document.
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.
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.
CTRL/CMD + /
It will comment or uncomment the line or the selected text based on the language you are using.
CTRL/CMD + [
Outdents your line or your selection.
CTRL/CMD + ]
Indents your line or your selection.
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.
ALT + LEFT MOUSE BUTTON
By holding down the ALT key, you can click wherever you want to add new cursors in your document.
SHIFT + ALT + UP/DOWN ARROW
Use it to easily copy your current line or selection up or down respectively.
CTRL + SPACE (Mac: ALT + ESC)
Brings up the autocomplete dropdown on demand.
CTRL + G
You can use it to navigate directly to a specific line of your document.
CTRL/CMD + D
It selects the whole word.
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.