All cheat sheets

VS Code Shortcuts

Visual Studio Code keyboard shortcuts quick reference: editing, multi-cursor, navigation, find & replace, terminal, debugging, refactoring, snippets and settings.

Cheat Sheet

Visual Studio Code is a free, open-source code editor by Microsoft. It combines a lightweight editor with powerful IDE-like features through extensions, an integrated terminal, and deep language support. Learning the keyboard shortcuts is the fastest way to become more productive.

Note: Shortcuts are for Windows/Linux. On macOS replace Ctrl with Cmd and Alt with Option.

General

ShortcutWhat it does
Ctrl+Shift+P / F1Command Palette - access every command in VS Code
Ctrl+PQuick Open - search and open files by name
Ctrl+Shift+NOpen a new VS Code window
Ctrl+WClose the current editor tab
Ctrl+Shift+TReopen the last closed editor tab
Ctrl+BToggle the Sidebar visibility
Ctrl+JToggle the Panel (Terminal, Output, Problems)
Ctrl+Shift+EShow the File Explorer sidebar
Ctrl+Shift+GOpen the Source Control panel (Git)
Ctrl+Shift+XOpen the Extensions panel
Ctrl+Shift+DOpen the Run and Debug panel
Ctrl+,Open Settings
Ctrl+K Ctrl+SOpen Keyboard Shortcuts
Ctrl+K ZZen Mode - full-screen distraction-free editing (Esc Esc to exit)

Editor & Editing

ShortcutWhat it does
Ctrl+XCut current line (without selection)
Ctrl+CCopy current line (without selection)
Ctrl+VPaste (preserves indentation of the target line)
Alt+Up / DownMove the current line (or selection) up/down
Shift+Alt+Up / DownDuplicate the current line (or selection) up/down
Ctrl+Shift+KDelete the current line
Ctrl+/Toggle line comment (//)
Shift+Alt+AToggle block comment (/* */)
Ctrl+DSelect the word at cursor (repeat to select next occurrence)
Ctrl+UUndo the last cursor operation
Ctrl+Shift+\Jump to matching bracket
Ctrl+\Split the editor (create a new editor group)
Ctrl+1 / 2 / 3Focus editor group 1, 2 or 3
Ctrl+K Ctrl+Left / RightFocus the previous/next editor group
Ctrl+[ / ]Indent / outdent the current line
Ctrl+Shift+EnterInsert a new line above the current line
Ctrl+EnterInsert a new line below the current line

Multi-Cursor & Selection

Multi-cursor is one of VS Code's superpowers. Master these shortcuts for lightning-fast bulk editing.

ShortcutWhat it does
Alt+ClickAdd a cursor at the clicked position
Ctrl+Alt+Up / DownAdd a cursor above/below the current line
Ctrl+DAdd the next occurrence of the selected word to the selection
Ctrl+Shift+LAdd all occurrences of the selected word (global rename)
Shift+Alt+IInsert a cursor at the end of every selected line
Ctrl+Shift+OAdd all occurrences of current selection in the file
EscRemove all extra cursors (keep the primary)

Navigation

ShortcutWhat it does
Ctrl+GGo to line number
Ctrl+PGo to file (type filename to fuzzy-search)
Ctrl+Shift+OGo to symbol in the current file (@ symbol name)
Ctrl+TGo to symbol in the entire workspace (# symbol name)
F12Go to definition of the symbol under the cursor
Alt+F12Peek definition (inline, without leaving the current file)
Shift+F12Find all references to the symbol under cursor
F8Go to the next error or warning in the file
Shift+F8Go to the previous error or warning
Ctrl+Shift+., Ctrl+Shift+,Navigate forward/backward through editor groups
Ctrl+TabNavigate through recently opened files (hold to preview)
Ctrl+MinusGo back to the previous cursor position
Ctrl+Shift+MinusGo forward to the next cursor position

Find & Replace

ShortcutWhat it does
Ctrl+FFind in the current file
Ctrl+HFind and replace in the current file
Ctrl+Shift+FFind in all files across the workspace
Ctrl+Shift+HFind and replace across all files
F3 / Shift+F3Find next / previous match
Alt+EnterSelect all matches of the current search term
Ctrl+Shift+JToggle search details (regex, case, whole word)

Integrated Terminal

ShortcutWhat it does
Ctrl+`Toggle the integrated terminal
Ctrl+Shift+`Create a new terminal instance
Ctrl+Shift+5Split terminal (create a second pane in the terminal panel)
Ctrl+Up / DownScroll terminal output
Ctrl+Shift+C / VCopy / paste in the terminal (Windows/Linux)
Alt+Left / RightSwitch between terminal tabs
Delete (in terminal tab)Kill the selected terminal instance

Debugging

ShortcutWhat it does
F5Start debugging (or continue if paused)
Shift+F5Stop debugging
Ctrl+Shift+F5Restart debugging session
F9Toggle a breakpoint on the current line
F10Step over (execute the current line, do not dive into functions)
F11Step into the function call on the current line
Shift+F11Step out of the current function
Ctrl+F5Start without debugging (run, no breakpoints)
Ctrl+Shift+YOpen the Debug Console

Refactoring & IntelliSense

Language servers (via extensions) power renaming, quick fixes, and smart suggestions. These shortcuts make large code changes safe and fast.

ShortcutWhat it does
F2Rename the symbol under the cursor and update every reference across the project.
Ctrl+.Quick fix / lightbulb: apply the suggested fix for an error or warning.
Ctrl+Shift+RRefactor menu (extract method/variable, change signature, etc.).
Ctrl+SpaceManually trigger IntelliSense suggestions at the cursor.
Ctrl+Shift+SpaceTrigger parameter hints for the current function call.
Ctrl+K Ctrl+IShow hover information for the symbol under the cursor.
Alt+Shift+FFormat the whole document (uses the default formatter, e.g. Prettier).
Ctrl+K Ctrl+FFormat only the selected lines.

Snippets & Settings

A few settings.json tweaks save time every single day. Snippets let you insert a block of code with a few keystrokes.

SettingWhat it does
"editor.formatOnSave": trueAuto-format the file every time you save. Pair with Prettier.
"editor.tabSize": 2Indentation width. Use 2 for JS/TS/HTML/CSS, 4 for Python.
"files.autoSave": "onFocusChange"Save automatically when you leave a file. Fewer Ctrl+S taps.
"editor.wordWrap": "on"Wrap long lines instead of scrolling horizontally.
"editor.renderWhitespace": "all"Show spaces and tabs, making indentation bugs obvious.
"editor.minimap.enabled": falseDisable the minimap for more editing space (optional).
"git.autofetch": trueAuto-fetch from the remote so you always see branch state.
"files.exclude"Hide build artifacts (e.g. "**/node_modules": true) from the Explorer.

Define your own snippets with Ctrl+Shift+PPreferences: Configure User Snippets.

{
  "Log to console": {
    "prefix": "clog",
    "body": [
      "console.log('$1', $1);",
      "$2"
    ],
    "description": "Insert a console.log"
  }
}

Essential Extensions

ESLint

Integrates ESLint - catches JS/TS errors and enforces code style as you type.

Prettier

Code formatter with support for JS, TS, CSS, HTML, JSON, Markdown, and more.

GitLens

Supercharges Git: blame annotations, code lens, inline history, and more.

Error Lens

Inline error messages directly in the editor (no need to hover).

Path Intellisense

Autocompletes filenames in import paths and strings.

Thunder Client

Lightweight REST API client built into VS Code (Postman alternative).

OCMA Tools

Free developer tools. Most features run client-side, your data stays in your browser. Optional accounts unlock extra features.

Most tools run client-side

© 2026 OCMA Tools — Free developer tools

built for developers, by developers