Useful VSCode Keyboard Shortcuts for macOS

Koji Mochizuki
Nov 3 · 2 min read
Useful VSCode Keyboard Shortcuts for macOS
Useful VSCode Keyboard Shortcuts for macOS
Photo by Fabian Irsara on Unsplash

It is hard to remember a lot of keyboard shortcuts, but it is worth learning them even if it takes time. I will make a note of the shortcuts that I use frequently in Visual Studio Code. The shortcut list includes some of Mac Shortcuts, not only VSCode’s originals, but all of them are useful for coding.

Keyboard Shortcuts for VSCode (macOS)

Copy Line (empty selection):

Cmd+C

Cut Line (empty selection):

Cmd+X

Delete Line:

Shift+Cmd+K

Insert Line Below/Above:

Cmd+Enter
Shift+Cmd+Enter

Move Line Down/Up:

Opt+Down
Opt+Up

Copy Line Down/Up:

Shift+Opt+Down
Shift+Opt+Up

Add Selection to Next Find Match:

Cmd+D

Add Cursors:

Opt+Click

Jump to Matching Bracket:

Shift+Cmd+\

Move Forward(Right)/Backward(Left)/Down/Up:

Ctrl+F
Ctrl+B
Ctrl+N
Ctrl+P

Delete Character on Left/Right:

Ctrl+H
Ctrl+D

Go to End/Beginning of Line:

Cmd+Right
Cmd+Left

Move by Word:

Opt+Right
Opt+Left

Go to End/Beginning of File:

Cmd+Down
Cmd+Up

Select to End/Beginning of Line:

Shift+Cmd+Right
Shift+Cmd+Left

Extend Selection Below/Above:

Shift+Down
Shift+Up

I use these when moving, duplicating, and commenting out multiple lines.

Extend Selection by Word:

Shift+Opt+Right
Shift+Opt+Left

Fold/Unfold All Methods:

Cmd+K+0
Cmd+K+J

Toggle Line Comment:

Cmd+/

Close Editor/Window:

Cmd+W

Save:

Cmd+S

Delete File:

Cmd+Del

Open Command Palette:

Shift+Cmd+P

Zoom In/Out:

Shift+Cmd+-
Cmd+-

Toggle Sidebar Visibility:

Cmd+B

New Terminal:

Ctrl+Shift+`

You can also open a terminal with the following shortcut.

Show Panel:

Cmd+J

Open Settings:

Cmd+,

That’s all! If there are any mistakes, please leave a comment below. I hope this note helps you :)

TechNest

Tutorials and tips for developers.

Koji Mochizuki

Written by

Full-Stack Web Dev | JS Node Python | Blockchain enthusiast | Twitter account: @kjmczk

TechNest

TechNest

Tutorials and tips for developers.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade