Useful VSCode Keyboard Shortcuts for macOS

KJ
TechNest
Published in
2 min readNov 3, 2019
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)

Basic Editing

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+/

Editor/Window Management

Close Editor/Window:

Cmd+W

File Management

Save:

Cmd+S

Delete File:

Cmd+Del

Display

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

Preferences

Open Settings:

Cmd+,

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

--

--