Useful VSCode Shortcuts

Move through the IDE faster and swiftly edit code using your keyboard. The best way to get used to these shortcuts is by slowly implementing them into your daily workflow.

Editing Code Shortcuts

Switch VSCode theme:

Cmd+k+t

Skip to start and end of line:

Cmd+Right

Cmd+Left

Move to start or end of file:

Cmd+up

Cmd+down

Skip to start and end of word line:

Option+Right

Option+Left

Copy/Paste or Cut lines of Code:

Cmd+C - copy

Cmd+V - paste

Cmd+X - cut

Move code lines up and down:

Option+Up

Option+Down

Copy lines up and down:

Shift+Option+Up

Shift+Option+Down

Delete line:

Shift+Cmd+K

Add line:

Shift + Enter

Switch to matching bracket:

Shift+Cmd+\

Comment Out Highlighted Code:

Cmd+K+C

Cmd+K+U - Uncomment Code

General VSCode Navigation & Setup

Install the VSCode shell command in local terminal (allows you to use 'code program.js' to open file easily in VSCode):

Shift+Cmd+P then choose option "Shell Command: install code command in terminal"

Zoom In:

Cmd++

Zoom Out:

Cmd--

Open the command palette:

Shift+Cmd+P

Toggle terminal:

Ctrl+`

Toggle sidebar:

Cmd+B

Quit VSCode

Cmd+Q

Close Window:

Cmd+W

Focus Sidebar (Scroll through files on the left)

Cmd+Shift+E