DEV Community

Cover image for VS Code Keyboard Shortcuts

VS Code Keyboard Shortcuts

Jack Fisher on June 17, 2019

If you’re anything like me then you might find yourself reaching for the mouse at every opportunity. But maybe you’ve been watching your favourite ...
Collapse
 
emnudge profile image
EmNudge

Shift + TAB actually does the same thing as Ctrl + [
The actual useful shortcut is Ctrl + ], strangely enough

You see, if you're in the middle of a line and press TAB, you will break up the line, adding a TAB inside of it. Using Ctrl + ] will indent the entire line, no matter where your cursor is.

Ctrl + [ and Shift + TAB are functionally the same as far as I have seen, though.

Collapse
 
fishj123 profile image
Jack Fisher

Awesome I didn't know that and I'll definitely be using it in future so thanks for the heads up

Collapse
 
nickhuanca profile image
Nick Huanca

One more fun one is CTRL + SHIFT + P which provides a way to search all commands in VScode. Helpful for things like Discover Tests or in the go extension, Run Test At Cursor. It's nice for me since some of the commands/extension tooling can be challenging to find via the file-menu dropdowns.

Collapse
 
petersimnz profile image
Peter Sim

A shortcut that I frequently use is Ctrl-Shift-D to duplicate a line of code. I'm not sure whether this is in VS Code by default, or whether it's something that has made its way into my setup via Atom's key map. Anyhow, good article, thanks.

Collapse
 
sandeepbalachandran profile image
Sandeep Balachandran

It would be so much readable and wonderful if you'd use specifiers for shortcuts. You know TL:DR may occur. Just a suggestion . and ofcourse an informative article.

Collapse
 
fishj123 profile image
Jack Fisher

Could you give me an example so I know what you mean? I'm not sure I understand. Maybe then I can edit the article!

Collapse
 
loq24 profile image
Lougie

I think he meant syntax highlighter for the readers to easily identify the shortcut codes.

Collapse
 
dhatguy profile image
Joseph Odunsi

Thank you for this 👏

Collapse
 
fishj123 profile image
Jack Fisher

You're welcome 😊

Collapse
 
shayd16 profile image
Shayne Darren

After highlighting a world, use Ctrl + D to find the next occurrence, repeat to highlight all occurrences and then make the changes you want.