VS Code Keyboard Shortcuts

High-value VS Code shortcuts for navigation, editing, multi-cursor, search, panels, and windows.

View
StandardDetailedCompact
Export
Copy the compact sheet, download it, or print it.
Download
`D` dense toggle · `C` copy all

Windows and Panels

New window

Open a new VS Code window.

textANYwindow
text
Windows/Linux: Ctrl+Shift+N
macOS: Cmd+Shift+N

Close window

Close the current VS Code window.

textANYwindow
text
Windows/Linux: Ctrl+Shift+W
macOS: Cmd+Shift+W

Toggle primary sidebar

Show or hide the explorer/sidebar area.

textANYsidebar
text
Windows/Linux: Ctrl+B
macOS: Cmd+B

Toggle bottom panel

Show or hide Problems, Output, Debug Console, Terminal.

textANYpanel
text
Windows/Linux: Ctrl+J
macOS: Cmd+J

Toggle Zen Mode

Minimal distraction-free editing mode.

textANYlayoutfocus
text
Windows/Linux: Ctrl+K Z
macOS: Cmd+K Z

File Navigation

Quick Open

Search and open files.

textANYfilesnavigation
text
Windows/Linux: Ctrl+P
macOS: Cmd+P

Cycle recent editors

Move through recently used tabs.

textANYnavigationtabs
text
Windows/Linux: Ctrl+Tab
macOS: Ctrl+Tab

Go to symbol in file

Jump to functions and symbols inside current file.

textANYsymbols
text
Windows/Linux: Ctrl+Shift+O
macOS: Cmd+Shift+O

Go back

Return to previous cursor location.

textANYnavigationhistory
text
Windows/Linux: Alt+Left
macOS: Ctrl+-

Go forward

Go forward in cursor history.

textANYnavigationhistory
text
Windows/Linux: Alt+Right
macOS: Ctrl+Shift+-

Editor Editing

Copy line up/down

Duplicate current line or selection.

textANYeditingduplicate
text
Windows/Linux: Shift+Alt+Up / Shift+Alt+Down
macOS: Shift+Option+Up / Shift+Option+Down

Join lines

Join selected lines or current line with next line.

textANYediting
text
Windows/Linux: Ctrl+J
macOS: Cmd+J

Trim trailing whitespace

Remove trailing spaces in active file.

textANYformattingcleanup
text
Windows/Linux: Ctrl+K Ctrl+X
macOS: Cmd+K Cmd+X

Toggle word wrap

Switch editor wrapping on and off.

textANYeditingview
text
Windows/Linux: Alt+Z
macOS: Option+Z

Change file language mode

Set syntax highlighting / language mode manually.

textANYlanguagesyntax
text
Windows/Linux: Ctrl+K M
macOS: Cmd+K M

Multi-Cursor

Add next occurrence to selection

Select next matching occurrence.

textANYmulti-cursor
text
Windows/Linux: Ctrl+D
macOS: Cmd+D

Select all occurrences

Create cursors for all matches.

textANYmulti-cursor
text
Windows/Linux: Ctrl+Shift+L
macOS: Cmd+Shift+L

Column / box select

Create rectangular selection.

textANYmulti-cursorcolumn
text
Windows/Linux: Shift+Alt + drag
macOS: Shift+Option + drag

Move last selection to next match

Skip the current occurrence and continue selection.

textANYmulti-cursor
text
Windows/Linux: Ctrl+K Ctrl+D
macOS: Cmd+K Cmd+D

Add cursors to line ends

Place a cursor at the end of each selected line.

textANYmulti-cursorselection
text
Shift+Alt+I

Recommended next

No recommendations yet.