Skip to content

Essential VS Code Shortcuts You Should Know

Mastering VS Code shortcuts is the fastest way to boost your coding speed. Here are the ones worth memorizing.

The Essentials

ShortcutAction
Ctrl+PQuick open file
Ctrl+Shift+PCommand palette
Ctrl+ `Toggle terminal
Ctrl+BToggle sidebar
Ctrl+JToggle panel

Multi-Cursor (Game Changer)

ShortcutAction
Ctrl+DSelect next occurrence
Ctrl+Shift+LSelect all occurrences
Alt+ClickAdd cursor
Ctrl+Alt+↑/↓Add cursor above/below
Shift+Alt+IAdd cursor to end of each selected line

Multi-cursor lets you edit multiple lines simultaneously. Select a word, spam Ctrl+D to select each occurrence, and type to change them all at once.

Editing

ShortcutAction
Alt+↑/↓Move line up/down
Shift+Alt+↑/↓Copy line up/down
Ctrl+Shift+KDelete line
Ctrl+/Toggle line comment
Shift+Alt+FFormat document
Ctrl+[ / Ctrl+]Indent / Outdent

Navigation

ShortcutAction
Ctrl+TShow all symbols
Ctrl+Shift+OGo to symbol in file
F12Go to definition
Alt+F12Peek definition
Ctrl+GGo to line
Ctrl+- / Ctrl+Shift+-Navigate back / forward

Search and Replace

ShortcutAction
Ctrl+FFind in file
Ctrl+HFind and replace in file
Ctrl+Shift+FFind in files
Ctrl+Shift+HFind and replace in files

Integrated Terminal

ShortcutAction
Ctrl+ `Toggle terminal
Ctrl+Shift+ `Create new terminal
Ctrl+WClose terminal
Ctrl+CCancel running command

Sidebar

ShortcutAction
Ctrl+BToggle sidebar
Ctrl+Shift+EExplorer
Ctrl+Shift+FSearch
Ctrl+Shift+GSource control
Ctrl+Shift+DDebug

Snippets and Emmet

ShortcutAction
TabExpand Emmet abbreviation
Ctrl+SpaceTrigger suggestion
Tab / Shift+TabNavigate snippet fields

Emmet example: type div.container>ul.list>li.item*5 then press Tab to generate the full HTML structure.


More developer tips: See our Git undo guide for fixing Git mistakes.