VS Code Shortcuts

VS Code keyboard shortcuts.

The VS Code shortcuts that matter — navigation, multi-cursor editing, find & replace. Mac and Windows.

Navigation
Command Palette++PCtrl+Shift+P
Quick Open file+PCtrl+P
Go to line+GCtrl+G
Go to symbol++OCtrl+Shift+O
Go to definitionF12F12
Toggle sidebar+BCtrl+B
Toggle terminal+`Ctrl+`
Editing
Comment line+/Ctrl+/
Move line up/down+↑/↓Alt+↑/↓
Copy line up/down++↑/↓Shift+Alt+↑/↓
Delete line++KCtrl+Shift+K
Select next occurrence+DCtrl+D
Format document++FShift+Alt+F
Rename symbolF2F2
Find & files
Find+FCtrl+F
Replace++FCtrl+H
Find in all files++FCtrl+Shift+F
Save+SCtrl+S
Split editor+\Ctrl+\
Settings+,Ctrl+,

Code faster in VS Code

The Command Palette (⌘/Ctrl + Shift + P) is the single most useful shortcut — it can run almost any command. Pair it with Quick Open and multi-cursor selection and you'll rarely touch the mouse.

FAQ

What is the VS Code Command Palette shortcut?
Press Command + Shift + P on Mac or Ctrl + Shift + P on Windows to open the Command Palette, which runs any VS Code command.
How do I add multiple cursors?
Press Command/Ctrl + D to select the next occurrence of the current word, adding a cursor at each. Or Alt-click to place cursors manually.

Related