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
Windows/Linux: Ctrl+Shift+N
macOS: Cmd+Shift+N

# Open a new VS Code window.

Close window
Windows/Linux: Ctrl+Shift+W
macOS: Cmd+Shift+W

# Close the current VS Code window.

Toggle primary sidebar
Windows/Linux: Ctrl+B
macOS: Cmd+B

# Show or hide the explorer/sidebar area.

Toggle bottom panel
Windows/Linux: Ctrl+J
macOS: Cmd+J

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

Toggle Zen Mode
Windows/Linux: Ctrl+K Z
macOS: Cmd+K Z

# Minimal distraction-free editing mode.

## File Navigation
Quick Open
Windows/Linux: Ctrl+P
macOS: Cmd+P

# Search and open files.

Cycle recent editors
Windows/Linux: Ctrl+Tab
macOS: Ctrl+Tab

# Move through recently used tabs.

Go to symbol in file
Windows/Linux: Ctrl+Shift+O
macOS: Cmd+Shift+O

# Jump to functions and symbols inside current file.

Go back
Windows/Linux: Alt+Left
macOS: Ctrl+-

# Return to previous cursor location.

Go forward
Windows/Linux: Alt+Right
macOS: Ctrl+Shift+-

# Go forward in cursor history.

## Editor Editing
Copy line up/down
Windows/Linux: Shift+Alt+Up / Shift+Alt+Down
macOS: Shift+Option+Up / Shift+Option+Down

# Duplicate current line or selection.

Join lines
Windows/Linux: Ctrl+J
macOS: Cmd+J

# Join selected lines or current line with next line.

Trim trailing whitespace
Windows/Linux: Ctrl+K Ctrl+X
macOS: Cmd+K Cmd+X

# Remove trailing spaces in active file.

Toggle word wrap
Windows/Linux: Alt+Z
macOS: Option+Z

# Switch editor wrapping on and off.

Change file language mode
Windows/Linux: Ctrl+K M
macOS: Cmd+K M

# Set syntax highlighting / language mode manually.

## Multi-Cursor
Add next occurrence to selection
Windows/Linux: Ctrl+D
macOS: Cmd+D

# Select next matching occurrence.

Select all occurrences
Windows/Linux: Ctrl+Shift+L
macOS: Cmd+Shift+L

# Create cursors for all matches.

Column / box select
Windows/Linux: Shift+Alt + drag
macOS: Shift+Option + drag

# Create rectangular selection.

Move last selection to next match
Windows/Linux: Ctrl+K Ctrl+D
macOS: Cmd+K Cmd+D

# Skip the current occurrence and continue selection.

Add cursors to line ends
Shift+Alt+I

# Place a cursor at the end of each selected line.

Recommended next

No recommendations yet.