Browse all keyboard shortcut cheat sheets

VS Code Keyboard Shortcuts (Latest) — Complete Cheat Sheet

Supercharge your coding workflow in Visual Studio Code with shortcuts for editing, navigation, terminal, and debugging.

47 shortcuts across 5 categories · Windows · macOS · Linux

Visual Studio Code is the most widely used code editor, and its extensive keyboard shortcut system is one of its greatest strengths. From multi-cursor editing to the Command Palette, mastering VS Code shortcuts lets you write, navigate, and refactor code without ever reaching for the mouse.

Editing

ActionShortcutDescription
Command Palette Ctrl + Shift + P Open the command palette to run any VS Code command
Quick Open File Ctrl + P Quickly open any file by name
Duplicate Line Shift + Alt + Duplicate the current line below
Move Line Down Alt + Move the current line down
Move Line Up Alt + Move the current line up
Delete Line Ctrl + Shift + K Delete the entire current line
Toggle Comment Ctrl + / Toggle line comment on the current line or selection
Block Comment Shift + Alt + A Toggle block comment on the selection
Format Document Shift + Alt + F Auto-format the entire document
Rename Symbol F2 Rename a variable or function across all files
Add Multiple Cursors Alt + Click Place additional cursors by clicking with Alt held
Select All Occurrences Ctrl + Shift + L Select every occurrence of the current word
Expand Selection Shift + Alt + Expand the selection to the next logical unit

Navigation

ActionShortcutDescription
Go to Definition F12 Jump to where a function or variable is defined
Peek Definition Alt + F12 View the definition inline without leaving the file
Go to References Shift + F12 Find all references to the symbol under the cursor
Go to Line Ctrl + G Jump to a specific line number
Go to Symbol in File Ctrl + Shift + O Jump to a function or class in the current file
Go to Symbol in Workspace Ctrl + T Search for any symbol across all files
Navigate Back Alt + Go back to the previous cursor location
Navigate Forward Alt + Go forward to the next cursor location
Switch Tab Ctrl + Tab Switch between open editor tabs
Split Editor Ctrl + \ Split the editor into two side-by-side panels

Search & Replace

ActionShortcutDescription
Find Ctrl + F Open find widget in the current file
Replace Ctrl + H Open find and replace in the current file
Find in Files Ctrl + Shift + F Search across all files in the workspace
Replace in Files Ctrl + Shift + H Find and replace across all files
Toggle Case Sensitive Alt + C Toggle case-sensitive search in the find widget
Toggle Regex Alt + R Toggle regular expression mode in the find widget
Find Next Enter Jump to the next search match
Find Previous Shift + Enter Jump to the previous search match

Terminal & Panels

ActionShortcutDescription
Toggle Terminal Ctrl + ` Show or hide the integrated terminal panel
New Terminal Ctrl + Shift + ` Open a new terminal instance
Toggle Sidebar Ctrl + B Show or hide the file explorer sidebar
Toggle Problems Panel Ctrl + Shift + M Show errors and warnings in the Problems panel
Toggle Output Panel Ctrl + Shift + U Show the output panel
Zoom In Ctrl + + Increase the editor font size
Zoom Out Ctrl + - Decrease the editor font size
Reset Zoom Ctrl + 0 Reset the editor zoom to default

Debug & Source Control

ActionShortcutDescription
Toggle Breakpoint F9 Add or remove a breakpoint on the current line
Start / Continue Debugging F5 Start a debug session or resume from a breakpoint
Step Over F10 Execute the next line without entering function calls
Step Into F11 Step into the function call on the current line
Step Out Shift + F11 Step out of the current function
Stop Debugging Shift + F5 Stop the current debug session
Open Source Control Ctrl + Shift + G Open the Git source control panel
Stage Changes Ctrl + Enter Stage selected changes in the source control panel

VS Code Tips & Tricks

  • Multi-cursor editing saves massive time: Place your cursor on a word, press Ctrl+D to select the next occurrence, and keep pressing to select more. Edit all of them simultaneously.
  • Use the Command Palette for everything: Press Ctrl+Shift+P and type anything — install extensions, change settings, run tasks, or switch themes — all without leaving the keyboard.
  • Emmet shortcuts speed up HTML/CSS: Type a CSS selector like ul>li*5 and press Tab — VS Code expands it into a full HTML structure instantly.

Frequently Asked Questions — VS Code

What is the most important VS Code keyboard shortcut?
Ctrl+Shift+P (Cmd+Shift+P on Mac) opens the Command Palette — the central hub for every VS Code command. From here you can run tasks, change settings, install extensions, and more without memorizing individual shortcuts.
How do I open the integrated terminal in VS Code?
Press Ctrl+` (backtick) to toggle the integrated terminal open or closed. Use Ctrl+Shift+` to create a new terminal instance.
How do I edit multiple lines at once in VS Code?
Hold Alt and click where you want additional cursors, or press Ctrl+Alt+Down/Up to add cursors on adjacent lines. Ctrl+D selects the next match of the current selection for multi-cursor editing.

How to Learn VS Code Keyboard Shortcuts

Visual Studio Code combines file navigation, multi-cursor editing, terminal access, debugging, source control, and extensions in one editor. Its shortcut system helps developers move between those tasks without repeatedly opening menus. A practical learning path is to start with commands that expose the rest of the interface, then add editing and navigation shortcuts that match the work you do most often.

The single most important VS Code shortcut to master first is Ctrl+Shift+P — the Command Palette. It gives you searchable access to every feature in the editor, so even before you've memorized individual shortcuts, you can do anything quickly by typing its name. From there, Ctrl+P (Quick Open by filename) and Ctrl+G (go to line) are the navigation shortcuts that save the most time in real codebases. Multi-cursor editing (Ctrl+D to select the next match, Ctrl+Alt+Down to add a cursor below) is the VS Code superpower most worth learning — once you can edit ten places at once, single-cursor editing starts to feel painfully slow.