VS Code Keyboard Shortcuts: The Ultimate Quick Reference Guide

A comprehensive and organized list of essential keyboard shortcuts.
From Startup to Scale: How Tech Services Propel Business Growth

⌨️ VS Code Keyboard Shortcuts

The Ultimate Shortcut

If you only memorize one shortcut, make it Ctrl + Shift + P. This opens the Command Palette, allowing you to search and execute any VS Code command or action instantly just by typing.

⚙️ General & Settings

Shortcut Action
Ctrl + Shift + P Show Command Palette
Ctrl + , Open settings
Ctrl + K Ctrl + S Open Keyboard Shortcuts
Ctrl + Shift + X Open Extensions view
Ctrl + Q Quit application

📁 File Management

Shortcut Action
Ctrl + N New file
Ctrl + Shift + N New Window/Instance
Ctrl + O Open file / folder
Ctrl + S Save
Ctrl + Shift + S Save As...
Ctrl + Alt + S Save All
Ctrl + W Close editor / window

📝 Edit

Shortcut Action
Ctrl + Z Undo
Ctrl + Shift + Z Redo
Ctrl + X Cut line (empty selection)
Ctrl + C Copy line (empty selection)
Ctrl + V Paste
Ctrl + Shift + F Find in files (Global Search)
Ctrl + / Toggle line comment
Pro-Tip

You don't need to select a whole line to copy or cut it. Just place your cursor anywhere on the line and press Ctrl + C or Ctrl + X, and VS Code will automatically target the entire line.

✂️ Selection & Cursor

Shortcut Action
Ctrl + A Select all
Shift + Alt + Right Expand selection
Shift + Alt + Left Shrink selection
Ctrl + Alt + Up Add cursor above
Ctrl + Alt + Down Add cursor below
Ctrl + D Add selection to next Find match
Alt + Up Move line up
Alt + Down Move line down
Shift + Alt + Up Copy line up
Shift + Alt + Down Copy line down

👁️ View & Layout (Panels & Splits)

Shortcut Action
Ctrl + B Toggle Primary Side Bar visibility
Ctrl + J Toggle Panel visibility (Terminal/Output)
`Ctrl + `` Toggle integrated terminal
Ctrl + \ Split editor
Ctrl + 1 / 2 / 3 Focus into 1st, 2nd or 3rd editor group
Ctrl + Shift + E Explorer view / focus
Ctrl + Shift + G Source Control view
Ctrl + Shift + D Run and Debug view
Ctrl + Shift + M Problems panel
Shortcut Action
Alt + Left Go back in history
Ctrl + P Quick Open, Go to File…
Ctrl + Shift + O Go to Symbol in Editor…
Ctrl + G Go to Line…
F12 Go to Definition
Ctrl + F12 Go to Implementation
Shift + F12 Show References
F8 Go to next error or warning
Shift + F8 Go to previous error or warning
macOS Users

Keep in mind that for macOS, you will generally need to swap Ctrl for Cmd (⌘) and Alt for Option (⌥).

Content Creator

Ghostwriter for the dark web. I publish step-by-step ransomware guides, exploit breakdowns, and deep-dive articles on how to dismantle corporate firewalls.