VS Code Cheatsheet

Keyboard shortcuts, settings, extensions & productivity tips

Tool
Contents
⌨️

General

Cmd+Shift+P        Command Palette
Cmd+P               Quick Open file
Cmd+Shift+N         New window
Cmd+W               Close editor
Cmd+,               Settings
Cmd+K Cmd+S         Keyboard shortcuts
Cmd+B               Toggle sidebar
Cmd+J               Toggle panel
Ctrl+`              Toggle terminal
Cmd+Shift+E         Explorer
Cmd+Shift+F         Search
Cmd+Shift+G         Source Control
Cmd+Shift+X         Extensions
Cmd+Shift+D         Run & Debug
✏️

Editing

Cmd+X               Cut line
Cmd+C               Copy line
Opt+↑/↓             Move line up/down
Shift+Opt+↑/↓       Copy line up/down
Cmd+Shift+K         Delete line
Cmd+Enter           Insert line below
Cmd+Shift+Enter     Insert line above
Cmd+D               Select word / next occurrence
Cmd+Shift+L         Select all occurrences
Cmd+/               Toggle comment
Shift+Opt+A         Block comment
Cmd+]               Indent
Cmd+[               Outdent
Opt+Z               Toggle word wrap
👆

Multi-Cursor

Opt+Click            Add cursor
Cmd+Opt+↑/↓          Add cursor above/below
Cmd+D                Select next occurrence
Cmd+Shift+L          Select all occurrences
Cmd+U                Undo last cursor
Esc                  Back to single cursor
Opt+Shift+I          Cursor at end of each line
💻

Terminal

Ctrl+`               Toggle terminal
Cmd+Shift+`          New terminal
Cmd+\                Split terminal
Cmd+Opt+← →          Switch terminal

# Terminal settings (settings.json)
"terminal.integrated.defaultProfile.osx": "zsh"
"terminal.integrated.fontSize": 14
📜

Git Integration

Cmd+Shift+G          Open Source Control
# Stage: click + next to file
# Commit: type message → Cmd+Enter
# Push: click ··· → Push

# Useful settings
"git.autofetch": true
"git.confirmSync": false
"git.enableSmartCommit": true

# Gutter indicators
# Green  = added lines
# Blue   = modified lines
# Red ▲  = deleted lines
🧩

Extensions

# Essential extensions
Prettier               Code formatter
ESLint                 JS/TS linter
GitLens                Git blame/history
GitHub Copilot         AI pair programmer
Error Lens             Inline error display
Thunder Client         REST API client
Docker                 Docker support
Remote - SSH           Remote dev via SSH
Live Server            Local dev server

# Install from CLI
code --install-extension esbenp.prettier-vscode
code --list-extensions