VS Code Cheat Sheet

Comprehensive VS Code reference for navigation, editing, multi-cursor, search, terminal, debugging, settings, and Git workflows.

View
StandardDetailedCompact
Export
Copy the compact sheet, download it, or print it.
Download
`D` dense toggle · `C` copy all
## Getting Around
Open Command Palette
Windows/Linux: Ctrl+Shift+P
macOS: Cmd+Shift+P

# Run any VS Code command quickly.

Quick Open file
Windows/Linux: Ctrl+P
macOS: Cmd+P

# Jump to files, symbols, and recent items.

Go to line
Windows/Linux: Ctrl+G
macOS: Ctrl+G

# Jump directly to a line number in the current file.

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

# Jump to a function, class, or symbol in the current file.

Show symbols in workspace
Windows/Linux: Ctrl+T
macOS: Cmd+T

# Search symbols across the workspace.

## Basic Editing
Delete line
Windows/Linux: Ctrl+Shift+K
macOS: Cmd+Shift+K

# Remove the current line quickly.

Insert line below
Windows/Linux: Ctrl+Enter
macOS: Cmd+Enter

# Open a new line below without moving manually.

Insert line above
Windows/Linux: Ctrl+Shift+Enter
macOS: Cmd+Shift+Enter

# Open a new line above the current line.

Move line up or down
Windows/Linux: Alt+Up / Alt+Down
macOS: Option+Up / Option+Down

# Reorder code without cut/paste.

Copy line up or down
Windows/Linux: Shift+Alt+Up / Shift+Alt+Down
macOS: Shift+Option+Up / Shift+Option+Down

# Duplicate the current line or selection.

Format document
Windows: Shift+Alt+F
Linux: Ctrl+Shift+I
macOS: Shift+Option+F

# Format the entire active file.

## Search, Terminal, and CLI
Find in current file
Windows/Linux: Ctrl+F
macOS: Cmd+F

# Search inside the current editor.

Find in files
Windows/Linux: Ctrl+Shift+F
macOS: Cmd+Shift+F

# Search across the whole workspace.

Toggle integrated terminal
Windows/Linux: Ctrl+`
macOS: Ctrl+`

# Open or focus the integrated terminal.

Open current folder in VS Code
code .

# Launch VS Code from a shell.

Open a diff view from the CLI
code --diff old-file.ts new-file.ts

# Compare two files in VS Code.

## Settings, Debugging, and Git
Open Settings UI
Windows/Linux: Ctrl+,
macOS: Cmd+,

# Search and edit settings through the UI.

Enable format on save
{
  "editor.formatOnSave": true
}

# Format files automatically when saved.

Start debugging
F5

# Launch the current debug configuration.

Basic Node.js launch.json
{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "node",
      "request": "launch",
      "name": "Debug current file",
      "program": "${file}"
    }
  ]
}

# Minimal launch config for debugging a Node script.

Open Source Control view
Windows/Linux: Ctrl+Shift+G
macOS: Ctrl+Shift+G

# Jump to the SCM panel quickly.

Recommended next

No recommendations yet.