VS Code Shortcuts

50 shortcuts · Windows / Mac / Linux · Last updated

The definitive guide to Visual Studio Code keyboard shortcuts — edit, navigate, refactor, and debug at the speed of thought.

General

Show Command Palette

Ctrl + Shift + P

Quick Open file

Ctrl + P

New window

Ctrl + Shift + N

Open Settings

Ctrl + ,

Open Keyboard Shortcuts

Ctrl + K, Ctrl + S

Editing

Cut line (empty selection)

Ctrl + X

Copy line (empty selection)

Ctrl + C

Move line up

Alt + Up

Move line down

Alt + Down

Copy line up

Shift + Alt + Up

Copy line down

Shift + Alt + Down

Toggle line comment

Ctrl + /

Toggle block comment

Shift + Alt + A

Toggle word wrap

Alt + Z

Navigation

Go to line

Ctrl + G

Show all symbols

Ctrl + T

Go to symbol in file

Ctrl + Shift + O

Go to next error or warning

F8

Go to previous error or warning

Shift + F8

Go back

Alt + Left

Go forward

Alt + Right

Search & Replace

Find

Ctrl + F

Replace

Ctrl + H

Find across files

Ctrl + Shift + F

Replace across files

Ctrl + Shift + H

Select all occurrences of match

Alt + Enter

Multi-cursor & Selection

Insert cursor

Alt + Click

Add cursor above

Ctrl + Alt + Up

Add cursor below

Ctrl + Alt + Down

Add selection to next match

Ctrl + D

Select all matches

Ctrl + Shift + L

Select current line

Ctrl + L

File Management

New file

Ctrl + N

Open file

Ctrl + O

Save

Ctrl + S

Save As

Ctrl + Shift + S

Close all editors

Ctrl + K, Ctrl + W

Reopen closed editor

Ctrl + Shift + T

Display

Toggle Sidebar

Ctrl + B

Toggle Panel (terminal, output)

Ctrl + J

Toggle terminal

Ctrl + `

Toggle full layout

Ctrl + K, Ctrl + B

Show Explorer

Ctrl + Shift + E

Show Source Control

Ctrl + Shift + G

Debug

Start debugging

F5

Stop debugging

Shift + F5

Toggle breakpoint

F9

Step over

F10

Step into

F11

Step out

Shift + F11

Related programs

Looking for a shortcut we missed? Let us know · Browse all 6 programs
ShortcutHub