VS Code Shortcuts
Every essential VS Code shortcut: navigation, editing, multi-cursor, search, terminal, Git, and debugging, with keys and real use cases.77 commands · 6 sections
VS Code is the most popular code editor. This cheatsheet covers the shortcuts that multiply your speed: command palette and navigation, editing and multi-cursor, search and replace, the integrated terminal and Git, and the debugger.
Windows/Linux keys are shown first; on macOS replace Ctrl with Cmd and Alt with Option.
General & Navigation19
Ctrl+PCtrl+Shift+PCtrl+TabCtrl+BCtrl+`Ctrl+Shift+ECtrl+Shift+FCtrl+GF12Alt+F12Shift+F12Ctrl+ClickF2Ctrl+Shift+OCtrl+OCtrl+\Ctrl+1 / Ctrl+2Ctrl+K Ctrl+OCtrl+K ZEditing & Multi-cursor19
Alt+ClickCtrl+DCtrl+Shift+LAlt+Up / Alt+DownShift+Alt+Up / DownCtrl+Shift+KCtrl+EnterCtrl+Shift+EnterCtrl+Alt+Up / DownCtrl+Shift+\Shift+Alt+IShift+Alt+RightCtrl+K Ctrl+XCtrl+]Ctrl+[Ctrl+Z / Ctrl+YCtrl+X / Ctrl+C / Ctrl+VCtrl+/Shift+Alt+ASearch & Replace10
Ctrl+FCtrl+HCtrl+Shift+HAlt+Enter (in find widget)F3 / Shift+F3Ctrl+Shift+JAlt+CAlt+WCtrl+Shift+QCtrl+P then @Integrated Terminal & Git9
Ctrl+`Ctrl+Shift+`Ctrl+Shift+5Ctrl+C (in terminal)Ctrl+Shift+C / Ctrl+Shift+VCtrl+Shift+GCtrl+Enter (in commit box)Ctrl+Shift+SpaceCtrl+K Ctrl+SDebugging10
F5F9F10F11Shift+F11Shift+F5Ctrl+F5Ctrl+Shift+F5Ctrl+K Ctrl+ICtrl+Shift+DEditor UI10
Ctrl+Shift+XCtrl+Shift+MCtrl+JCtrl+WCtrl+Shift+WCtrl+K Ctrl+RCtrl+K Ctrl+PCtrl+K MCtrl+K TCtrl+Shift+UVS Code Shortcuts
Every essential VS Code shortcut: navigation, editing, multi-cursor, search, terminal, Git, and debugging, with keys and real use cases.
VS Code is the most popular code editor. This cheatsheet covers the shortcuts that multiply your speed: command palette and navigation, editing and multi-cursor, search and replace, the integrated terminal and Git, and the debugger.
Windows/Linux keys are shown first; on macOS replace Ctrl with Cmd and Alt with Option.
General & Navigation
Ctrl+P: Quick open: jump to any file by name. The most-used shortcut.Ctrl+Shift+P: Command palette: run ANY command by name.Ctrl+Tab: Cycle through open files (tabs).Ctrl+B: Toggle the sidebar.Ctrl+`: Toggle the integrated terminal.Ctrl+Shift+E: Focus the Explorer sidebar.Ctrl+Shift+F: Search across ALL files.Ctrl+G: Go to line number.F12: Go to definition: jump to where a symbol is defined.Alt+F12: Peek definition: inline preview without leaving the file.Shift+F12: Find all references: everywhere a symbol is used.Ctrl+Click: Go to definition from a click.F2: Rename symbol: renames every usage across files.Ctrl+Shift+O: Go to symbol in the current file: outline navigation.Ctrl+O: Open a file from disk.Ctrl+\: Split the editor: two files side by side.Ctrl+1 / Ctrl+2: Focus editor group 1 / 2.Ctrl+K Ctrl+O: Open a folder.Ctrl+K Z: Zen mode: full-screen focus, no UI.Editing & Multi-cursor
Alt+Click: Add a cursor at the click: edit multiple places at once.Ctrl+D: Select the next occurrence of the current selection: multi-cursor storm.Ctrl+Shift+L: Select ALL occurrences at once.Alt+Up / Alt+Down: Move the current line up / down.Shift+Alt+Up / Down: Duplicate the line above / below.Ctrl+Shift+K: Delete the whole line: no selection needed.Ctrl+Enter: Insert a new line below without moving the cursor.Ctrl+Shift+Enter: Insert a new line ABOVE.Ctrl+Alt+Up / Down: Add cursors above / below: column editing.Ctrl+Shift+\: Jump to the matching bracket.Shift+Alt+I: Add a cursor at the end of every selected line: suffix edit.Shift+Alt+Right: Expand selection: select more and more (smart).Ctrl+K Ctrl+X: Trim trailing whitespace: clean up the file.Ctrl+]: Indent the line (increase).Ctrl+[: Outdent the line (decrease).Ctrl+Z / Ctrl+Y: Undo / redo.Ctrl+X / Ctrl+C / Ctrl+V: Cut / copy / paste: with smart line handling when nothing is selected.Ctrl+/: Toggle line comment.Shift+Alt+A: Toggle block comment.Search & Replace
Ctrl+F: Find in the current file.Ctrl+H: Replace in the current file.Ctrl+Shift+H: Replace across ALL files.Alt+Enter (in find widget): Select ALL matches of a search: jump to multi-cursor.F3 / Shift+F3: Next / previous match.Ctrl+Shift+J: Toggle regex mode in the search widget.Alt+C: Toggle case sensitivity in search.Alt+W: Toggle whole-word match in search.Ctrl+Shift+Q: Toggle search in open editors only.Ctrl+P then @: Quick open then symbol: search symbols project-wide.Integrated Terminal & Git
Ctrl+`: Toggle the integrated terminal.Ctrl+Shift+`: Open a NEW terminal.Ctrl+Shift+5: Split the terminal panel.Ctrl+C (in terminal): Cancel the running command (or copy if selection exists).Ctrl+Shift+C / Ctrl+Shift+V: Copy / paste in the terminal.Ctrl+Shift+G: Open the Source Control (Git) panel.Ctrl+Enter (in commit box): Commit the staged changes with the message in the box.Ctrl+Shift+Space: Parameter hints: see a function's signature inline.Ctrl+K Ctrl+S: Open the keyboard shortcuts editor: find and change ANY shortcut.Debugging
F5: Start debugging (or continue).F9: Toggle a breakpoint on the current line.F10: Step over: run the current line, stay on the same function.F11: Step INTO: follow the function call.Shift+F11: Step OUT: finish the current function.Shift+F5: Stop debugging.Ctrl+F5: Run without debugging.Ctrl+Shift+F5: Restart debugging session.Ctrl+K Ctrl+I: Hover inline: show the type of the symbol under the cursor.Ctrl+Shift+D: Open the Run and Debug view.Editor UI
Ctrl+Shift+X: Open the Extensions view: install and manage extensions.Ctrl+Shift+M: Open the Problems panel: all errors and warnings.Ctrl+J: Toggle the bottom panel.Ctrl+W: Close the current editor tab.Ctrl+Shift+W: Close ALL editor tabs.Ctrl+K Ctrl+R: Reveal the current file in the OS file explorer.Ctrl+K Ctrl+P: Copy the current file's path.Ctrl+K M: Change the language mode of the current file.Ctrl+K T: Open the theme picker.Ctrl+Shift+U: Open the Output panel: extension and tool logs.Frequently asked questions
What are the most useful VS Code shortcuts?
Ctrl+Shift+P opens the command palette, Ctrl+P jumps to any file, Ctrl+Shift+F searches across files, and Ctrl+` toggles the terminal. Ctrl+D selects the next occurrence for multi-cursor editing.
How do multi-cursors work?
Alt+Click places an extra cursor, Ctrl+Alt+Up/Down adds cursors vertically, and Ctrl+D selects the next matching word. Type once to edit all cursors simultaneously. Escape exits multi-cursor mode.
How do I debug in VS Code?
F5 starts debugging, F9 toggles a breakpoint, F10 steps over, and F11 steps into. Set a launch.json configuration for your runtime, or use the built-in debugger for Node.js and browsers.
How do I search and replace with regex?
Open Find with Ctrl+F or Replace with Ctrl+H, then toggle the .* icon to enable regular expressions. Use capture groups like (\w+) and $1 in the replace field to reference them.