VC

VS Code Keyboard Shortcuts

100+ Visual Studio Code shortcuts for coding, debugging, and terminal. Searchable reference for Mac, Windows, and Linux.

81 shortcuts 9 categories

General

Action Shortcut
Command Palette
Quick Open file
Open Settings
Toggle Terminal
Toggle Sidebar
Toggle Panel (terminal area)
Keyboard Shortcuts editor
New Window
Close current tab
Reopen closed tab

Editing

Action Shortcut
Cut line (empty selection)
Copy line (empty selection)
Delete line
Move line up
Move line down
Copy line up
Copy line down
Insert line below
Insert line above
Indent line
Outdent line
Toggle line comment
Toggle block comment
Fold region
Unfold region
Fold all
Unfold all

Multi-Cursor

Action Shortcut
Add cursor at click position
Add cursor above
Add cursor below
Select next occurrence of word
Select all occurrences of word
Select current line
Column/box selection
Trigger parameter hints
Undo last cursor operation
Select all occurrences of current word

Search

Action Shortcut
Find
Replace
Search across files
Replace across files
Find next
Find previous
Select all matches (in Find)
Go to line number

Navigation

Action Shortcut
Switch between open tabs
Show Explorer panel
Show Source Control panel
Show Extensions panel
Show Debug panel
Split editor
Focus on editor group
Focus left editor group
Focus right editor group
Navigate back
Navigate forward

IntelliSense

Action Shortcut
Trigger IntelliSense / autocomplete
Go to Definition
Peek Definition
Show all References
Rename Symbol
Quick Fix / Code Action
Format selection
Format entire document
Show hover info
Go to Symbol in file
Go to Symbol in workspace

Terminal

Action Shortcut
Toggle integrated terminal
New terminal
Split terminal
Switch between terminals

Debug

Action Shortcut
Start / Continue debugging
Stop debugging
Toggle breakpoint
Step over
Step into
Step out
Show debug hover

Git

Action Shortcut
Open Source Control view
Git commands via palette
Commit staged changes

Pro tips

Command Palette is Everything

Ctrl+Shift+P opens the Command Palette - every VS Code action is accessible here. If you forget a shortcut, search for the command name. You can also find and set keybindings from here.

Multi-Cursor Editing is a Superpower

Ctrl+D selects the next occurrence of the current word. Keep pressing to select more. Then type to edit all at once. Ctrl+Shift+L selects ALL occurrences instantly.

Move Lines, Don't Cut and Paste

Alt+Up/Down moves entire lines without cutting and pasting. Shift+Alt+Up/Down duplicates lines. These two shortcuts alone can save hours per week.

Split Editors for Comparison

Ctrl+\ splits the editor. Drag tabs between groups. Use Ctrl+1/2/3 to focus on specific groups. Essential for comparing files or viewing HTML and CSS side by side.

Use Quick Fix for Imports

Ctrl+. on an unresolved symbol shows Quick Fix suggestions, including auto-import. Combined with F2 for rename, you can refactor code without touching import statements.

Navigate with Ctrl+P

Ctrl+P opens Quick Open - type a filename to jump to it instantly. Add : for line number (file.ts:42), @ for symbol (@myFunction), or # for workspace search.

Frequently asked questions

How do I customize keyboard shortcuts in VS Code?

Open Keyboard Shortcuts with Ctrl+K Ctrl+S. Search for any command, click the pencil icon, and press your desired key combination. You can also edit keybindings.json directly for advanced customization.

What's the difference between Ctrl+P and Ctrl+Shift+P?

Ctrl+P (Quick Open) searches for files by name. Ctrl+Shift+P (Command Palette) searches for commands/actions. In Quick Open, type > to switch to Command Palette mode, or : for go-to-line.

How do I use multi-cursor editing effectively?

Start with Ctrl+D to select word occurrences one by one. Use Alt+Click to place cursors manually. Shift+Alt+Drag for column selection. All cursors type simultaneously. Press Escape to return to single cursor.

How do I format code automatically?

Shift+Alt+F formats the entire file. Ctrl+K Ctrl+F formats just the selection. Install Prettier or ESLint extensions and enable 'Format On Save' in settings for automatic formatting.

What are the best VS Code extensions for web development?

Essential: Prettier (formatting), ESLint (linting), GitLens (Git history), Auto Rename Tag, Bracket Pair Colorizer (built-in now). For React: ES7+ React Snippets. For Tailwind: Tailwind CSS IntelliSense.

How do I use the integrated terminal effectively?

Ctrl+` toggles the terminal. Ctrl+Shift+` creates a new one. You can split terminals, rename them, and even change the default shell. Right-click the terminal tab for more options.

Want to master VS Code?

Go beyond shortcuts with in-depth VS Code video courses, from the basics all the way to advanced workflows.

Explore VS Code courses