Skip to content
EverythingTool logo
Shortcut Keys

VS Code Shortcut Keys

Searchable list of Visual Studio Code keyboard shortcuts for editing, multi-cursor, navigation and debugging.

Visual Studio Code on Windows and Linux (default keymap). On a Mac, use Cmd in place of Ctrl for most shortcuts.

General

Ctrl+Shift+POpen the Command Palette
F1Open the Command Palette
Ctrl+PQuick Open — go to a file by name
Ctrl+Shift+NNew window
Ctrl+Shift+WClose the window
Ctrl+,Open Settings
Ctrl+KthenCtrl+SOpen Keyboard Shortcuts
Ctrl+KthenCtrl+TChoose a colour theme

Basic editing

Ctrl+XCut the line (when nothing is selected)
Ctrl+CCopy the line (when nothing is selected)
Alt+↑Move the line up
Alt+↓Move the line down
Shift+Alt+↑Copy the line up
Shift+Alt+↓Copy the line down
Ctrl+Shift+KDelete the line
Ctrl+EnterInsert a line below
Ctrl+Shift+EnterInsert a line above
Ctrl+Shift+\Jump to the matching bracket
Ctrl+]Indent the line
Ctrl+[Outdent the line
HomeGo to the start of the line
EndGo to the end of the line
Ctrl+HomeGo to the start of the file
Ctrl+EndGo to the end of the file
Ctrl+/Toggle line comment
Shift+Alt+AToggle block comment
Alt+ZToggle word wrap

Multi-cursor and selection

Alt+ClickAdd a cursor
Ctrl+Alt+↑Add a cursor above
Ctrl+Alt+↓Add a cursor below
Ctrl+UUndo the last cursor operation
Shift+Alt+IAdd a cursor at the end of each selected line
Ctrl+LSelect the current line
Ctrl+DSelect the next match of the current word
Ctrl+KthenCtrl+DSkip this match and select the next one
Ctrl+Shift+LSelect all matches of the current selection
Ctrl+F2Select all matches of the current word
Shift+Alt+→Expand the selection
Shift+Alt+←Shrink the selection
Shift+Alt+DragColumn (box) selection

Search and replace

Ctrl+FFind
Ctrl+HReplace
F3Find next
Shift+F3Find previous
Alt+EnterSelect all matches of the find term
Ctrl+Shift+FSearch across files
Ctrl+Shift+HReplace across files

Code intelligence

Ctrl+SpaceTrigger suggestions
Ctrl+Shift+SpaceShow parameter hints
Shift+Alt+FFormat the document
Ctrl+KthenCtrl+FFormat the selection
F12Go to definition
Alt+F12Peek definition
Ctrl+KthenF12Open the definition to the side
Shift+F12Show references
Shift+Alt+F12Find all references
F2Rename symbol
Ctrl+.Quick fix
Ctrl+KthenCtrl+XTrim trailing whitespace
Ctrl+KthenMChange the file's language mode

Navigation

Ctrl+TGo to a symbol in the workspace
Ctrl+Shift+OGo to a symbol in the file
Ctrl+GGo to line
Ctrl+Shift+MShow the Problems panel
F8Go to the next error or warning
Shift+F8Go to the previous error or warning
Ctrl+TabSwitch between open editors
Alt+←Go back
Alt+→Go forward
Ctrl+MToggle Tab moving focus

Editors and panes

Ctrl+\Split the editor
Ctrl+1Focus the first editor group (Ctrl+2, Ctrl+3 for the others)
Ctrl+WClose the editor
Ctrl+KthenWClose all editors in the group
Ctrl+Shift+TReopen the last closed editor
Ctrl+KthenCtrl+←Focus the editor group to the left
Ctrl+Shift+PgUpMove the editor tab left
Ctrl+Shift+PgDnMove the editor tab right
Ctrl+KthenCtrl+0Fold all regions
Ctrl+KthenCtrl+JUnfold all regions
Ctrl+Shift+[Fold the current region
Ctrl+Shift+]Unfold the current region

Files

Ctrl+NNew file
Ctrl+OOpen a file
Ctrl+SSave
Ctrl+Shift+SSave As
Ctrl+KthenSSave all
Ctrl+KthenPCopy the path of the active file
Ctrl+KthenRReveal the active file in File Explorer
Ctrl+KthenOOpen the active file in a new window

Display and panels

F11Toggle full screen
Ctrl+KthenZZen mode (press Esc twice to leave)
Ctrl+=Zoom in
Ctrl+−Zoom out
Ctrl+BShow or hide the sidebar
Ctrl+Shift+EExplorer
Ctrl+Shift+GSource Control
Ctrl+Shift+DRun and Debug
Ctrl+Shift+XExtensions
Ctrl+JShow or hide the panel
Ctrl+Shift+UOutput panel
Ctrl+Shift+VMarkdown preview
Ctrl+KthenVOpen the Markdown preview to the side

Terminal and debugging

Ctrl+`Show or hide the integrated terminal
Ctrl+Shift+`Create a new terminal
Ctrl+↑Scroll the terminal up
Ctrl+↓Scroll the terminal down
F9Toggle breakpoint
F5Start or continue debugging
Shift+F5Stop debugging
F10Step over
F11Step into (while debugging)
Shift+F11Step out
Ctrl+KthenCtrl+IShow the hover information
Share this tool WhatsApp X Facebook

How to use this list

Type what you want to do — “cursor”, “terminal”, “format” — or filter by section. Keys joined by + are pressed together; keys separated by a comma are a chord: press the first combination, release, then press the next. Download the PDF cheat sheet to keep beside your keyboard.

The shortcuts that save the most time

  • Command Palette (Ctrl+Shift+P) — every command in VS Code, searchable by name. If you forget a shortcut, find the command here and the shortcut is shown next to it.
  • Quick Open (Ctrl+P) — jump to any file by typing part of its name. Add : and a number to go to a line, or @ to go to a symbol.
  • Multiple cursors — Ctrl+D adds the next match of a word to the selection, so you can rename it everywhere in seconds. Alt+Click places cursors anywhere.
  • Move and copy lines — Alt+Up/Down moves the line; add Shift to copy it instead.
  • Rename symbol (F2) — renames a variable or function across every file, safer than find-and-replace.

Customising shortcuts

Open the Keyboard Shortcuts editor with Ctrl+K, Ctrl+S to search, change or remove any binding. Moving from another editor? Install a keymap extension (for example the Sublime Text keymap) to keep the shortcuts you already know — see the Sublime Text shortcut list. For system-wide keys, see Windows keyboard shortcuts.

Frequently asked questions

How do I select all occurrences of a word in VS Code?

Put the cursor on the word and press Ctrl+F2, or select it and press Ctrl+Shift+L. To add matches one at a time, press Ctrl+D repeatedly.

What is the shortcut to format code in VS Code?

Shift+Alt+F formats the whole document; Ctrl+K then Ctrl+F formats only the selection. You need a formatter for the language, such as Prettier for JavaScript.

How do I open the terminal in VS Code?

Press Ctrl+` (the backtick key, left of 1) to show or hide the integrated terminal. Ctrl+Shift+` opens a new terminal.

What does Ctrl+K, Ctrl+S mean?

It's a chord: press Ctrl+K, release, then press Ctrl+S. This one opens the Keyboard Shortcuts editor, where you can search and change any shortcut.

Are the shortcuts the same on a Mac?

Mostly — use Cmd in place of Ctrl. A few differ, for example the terminal is Ctrl+` on Mac too, and moving lines uses Option+Up/Down.

Last updated: 24 September 2026Suggest an improvement · Report a problem

Official websites, opening in a new tab. EverythingTool isn't affiliated with them.