Visual Studio Code (VS Code) is one of the most popular code editors, known for its speed, flexibility, and massive extension library. While many developers navigate using the mouse, keyboard shortcuts are the real key to productivity. They allow you to code, refactor, and navigate without breaking your flow.
In this article, we focus on the most complete list of editing shortcuts in VS Code — from the essentials to rare, but powerful, commands. Our largest section, Code Editing Commands, will serve as your ultimate reference for all things editing.
These shortcuts handle everything related to writing, editing, and manipulating code. We’ve divided them into categories for clarity.
Ctrl + C — Copy current line (if nothing is selected).
Ctrl + X — Cut current line (if nothing is selected).
Ctrl + V — Paste from clipboard.
Ctrl + Shift + K — Delete current line.
Ctrl + Enter — Insert a new line below.
Ctrl + Shift + Enter — Insert a new line above.
Alt + ↑ / Alt + ↓ — Move current line or selected block up/down.
Shift + Alt + ↑ / Shift + Alt + ↓ — Duplicate current line or selection above/below.
Ctrl + J — Join selected lines into one.
Tab / Shift + Tab — Indent / outdent selection.
Ctrl + ] / Ctrl + [ — Increase/decrease indentation.
Ctrl + K, Ctrl + * — Align code (requires extension).
Ctrl + / — Toggle line comment.
Shift + Alt + A — Toggle block comment.
Ctrl + Delete — Delete word to the right.
Ctrl + Backspace — Delete word to the left.
Ctrl + Shift + Delete — Delete from cursor to line end.
Ctrl + Shift + Backspace — Delete from cursor to line start.
Ctrl + K, Ctrl + X — Trim trailing whitespace.
Shift + Arrow Keys — Select character by character.
Ctrl + Shift + Arrow Keys — Select word by word.
Shift + Home / Shift + End — Select to start/end of line.
Ctrl + Shift + Home / Ctrl + Shift + End — Select to start/end of document.
Ctrl + L — Select entire line.
Ctrl + Shift + L — Select all occurrences of selection.
Ctrl + F2 — Select all occurrences of current word.
Alt + Click — Add a new cursor.
Ctrl + Alt + ↑ / Ctrl + Alt + ↓ — Add cursor above/below.
Ctrl + D — Select next occurrence of word.
Shift + Alt + Drag (mouse) — Column selection.
Ctrl + Shift + Alt + Arrow Keys — Column selection without mouse.
Ctrl + Shift + \ — Jump to matching bracket.
Ctrl + M — Move to matching bracket.
Ctrl + Shift + \ — Jump between opening/closing tags (HTML/XML).
Ctrl + → / Ctrl + ← — Jump word by word.
Ctrl + ↑ / Ctrl + ↓ — Scroll without moving cursor.
Home / End — Move to start/end of line.
Ctrl + Home / Ctrl + End — Move to start/end of document.
Ctrl + Shift + U — Convert to uppercase.
Ctrl + Shift + L — Convert to lowercase (extension).
Alt + Shift + U — Convert to title case (extension).
Ctrl + K, U — Uppercase selected text.
Ctrl + K, L — Lowercase selected text.
Shift + Alt + S — Sort selected lines.
Ctrl + Shift + Backspace + Delete combo — Remove empty lines (extension).
Alt + Z — Toggle word wrap.
💡 Tip: Many rare commands (sorting, case conversion) require installing official extensions like Sort Lines or Text Power Tools.
Ctrl + P — Quick open file.
Ctrl + Tab — Switch recent files.
Ctrl + Shift + T — Reopen closed file.
Ctrl + Shift + O — Go to symbol in file.
Ctrl + T — Search symbols in workspace.
F12 — Go to definition.
Alt + F12 — Peek definition.
Ctrl + F — Find in file.
Ctrl + H — Replace in file.
Ctrl + Shift + F — Search across files.
Ctrl + Shift + H — Replace across files.
Ctrl + Alt + ↑ / ↓ — Add cursors.
Ctrl + D — Next match.
Ctrl + Shift + L — All matches.
Ctrl + B — Toggle sidebar.
Ctrl + \ — Split editor.
Ctrl + 1 / 2 / 3 — Focus editor group.
Ctrl + ` — Toggle terminal.
Ctrl + Shift + ` — New terminal.
F5 — Start debugging.
Shift + Alt + F — Format document.
Ctrl + K, Ctrl + F — Format selection.
F2 — Rename symbol.
Ctrl + . — Quick fix.
Ctrl + Shift + G — Source Control view.
Ctrl + Enter — Commit changes.
Ctrl + Space — Trigger suggestions.
Ctrl + Shift + Space — Parameter hints.
Ctrl + K, Z — Zen Mode.
Ctrl + K, Ctrl + W — Close all editors.
Ctrl + K, Ctrl + S — Keyboard Shortcuts editor.
By mastering the Code Editing Commands and other key areas, you can cut your coding time drastically and work far more efficiently.