DEV Community

🚣 10 Must-Know VS Code Shortcuts

Stefi Rosca on October 22, 2023

Moving from keyboard to mouse to perform some action can sometimes be annoying. VS Code has some really nice keyboard shortcuts to help keep me in ...
Collapse
 
kekwlekw profile image
FkUnder Collins

Windows shortcuts would be nice too...

Collapse
 
stefirosca profile image
Stefi Rosca

You are right :) Have a look at the windows shortcuts here: code.visualstudio.com/shortcuts/ke...

Collapse
 
samejima profile image
Samejima • Edited

for windows just replace the command key for ctrl and ⌥ for alt.

Collapse
 
nemchik profile image
Eric Nemchik

One I just learned recently is Ctrl+/ to comment/uncomment the current line.

Collapse
 
michaeltharrington profile image
Michael Tharrington

Great list, Stefi! Appreciate ya sharing. 😀

Collapse
 
twosavoie profile image
Lisa Savoie

Thanks so much for putting this together! It's been super helpful!

Collapse
 
enocgit profile image
Enoch Ansah

Thank you. 7 will definitely be one of my favorites from now.

Collapse
 
melphindev profile image
MelphinDev

Cool! I didn't know about 2., 4., 5. until now.

Collapse
 
marcitpro profile image
Marcitpro

Great post

Collapse
 
memahesh profile image
Medam Mahesh

When dealing with large files, I tend to use the Collapse All shortcut a lot to quickly navigate to the required function.

code.visualstudio.com/docs/editor/...

Collapse
 
drumm profile image
Sam J.

What could also be handy for programmers, are the commands for word part selection/deletion which unfortunately are not set (hard to standardize, definitely across OSes). When adding an ALT to all commands compared to the word selection/deletion commands, this has typically side affects with the OS navigation (e.g. desktop switching). Has anybody find a good key combination for this which is logical? Thanks!!

Image description

Collapse
 
maxmaxmax profile image
Max • Edited

Command/CTRL + Shift + L - select all the occurrences of the word/selection immediately