VS Code Shortcuts Cheat Sheet

Every keyboard shortcut — editing, multi-cursor, search & debugging.

A free, searchable Visual Studio Code keyboard shortcut guide on one long page. Covers essential editing, multi-cursor & selection, navigation, search & replace, code editing & refactoring, panels/views, Source Control (Git) and debugging — every shortcut shown as real Windows/Linux AND Mac key-cap chips, with a plain-English explanation of when to use it. Includes a quick-reference table clarifying the four similar-looking "Go To" shortcuts (files, commands, line numbers, symbols). Search “format”, “multi cursor” or “git” to jump straight to it. Runs fully in your browser, no sign-up, no API.

About VS Code Shortcuts Cheat Sheet

VS Code Shortcuts Cheat Sheet features

Best practices

Shortcuts most VS Code users never discover

The Command Palette covers everything, but these specific combos save the most repeated clicks.

Type ">" inside Quick Open (Ctrl/⌘+P) to turn it into the Command Palette instantly — you never have to remember two separate shortcuts.

Frequently asked questions

What is the most important VS Code shortcut to learn first?

The Command Palette (Ctrl+Shift+P on Windows/Linux, ⌘+Shift+P on Mac). It's a searchable list of literally every action VS Code can do — type a few letters of what you want and press Enter, no menu-hunting required.

How do I quickly open a file without using the mouse?

Press Ctrl+P (⌘+P on Mac) to open Quick Open, then type a few letters of the filename and press Enter. It searches every file in your project instantly.

How do I select and edit multiple lines at once in VS Code?

Hold Ctrl+Alt and press ↑ or ↓ (⌘+Option+↑/↓ on Mac) to add a cursor directly above or below your current one. Anything you type from then on is typed on every active cursor at once.

How do I rename a variable everywhere it's used?

Put your cursor on the variable name and press F2. Type the new name and press Enter — VS Code updates every reference to it across the whole project, not just the current file.

How do I format my code automatically?

Press Shift+Alt+F (Shift+Option+F on Mac) to auto-format the current file using whichever formatter is installed for that language, such as Prettier.

How do I search across my entire project, not just one file?

Press Ctrl+Shift+F (⌘+Shift+F on Mac) to open project-wide search. It searches every file in your open folder and lets you replace across all of them too with Ctrl+Shift+H.

How do I select every occurrence of the same word?

Press Ctrl+D (⌘+D on Mac) repeatedly to select the word under your cursor and then each next matching occurrence one at a time, or Ctrl+Shift+L (⌘+Shift+L on Mac) to select every occurrence in the file instantly.

How do I open or close the built-in terminal?

Press Ctrl+` (the backtick key, ⌘+` on Mac) to toggle VS Code's integrated terminal panel without leaving the editor.

Are VS Code shortcuts different on Windows, Linux and Mac?

Mostly the same, but Ctrl on Windows/Linux becomes ⌘ (Command) on Mac for most shortcuts, and Alt becomes Option. This guide shows both key combinations side by side for every shortcut.

How do I comment out a line of code quickly?

Press Ctrl+/ (⌘+/ on Mac) with your cursor on the line, or with several lines selected, to toggle a comment on or off using the correct syntax for that file's language.

How do I jump to where a function is defined?

Put your cursor on the function name and press F12 to jump straight to its definition, even if it's in a different file.

Can I customize VS Code's keyboard shortcuts?

Yes — open the Command Palette and search "Preferences: Open Keyboard Shortcuts", or press Ctrl+K Ctrl+S (⌘+K ⌘+S on Mac), to see and rebind every shortcut in the editor.

Is there a keyboard shortcut to open Git / Source Control in VS Code?

Yes — Ctrl+Shift+G (⌘+Shift+G on Mac) opens the Source Control panel. Most other Git actions (staging, discarding) are click-driven with no default keybinding, but once you've typed a commit message, Ctrl+Enter (⌘+Enter on Mac) commits it without touching the mouse.

What is the difference between Ctrl+P, Ctrl+Shift+P, Ctrl+G and Ctrl+Shift+O?

All four open a similar searchable dropdown, but each searches something different: Ctrl+P searches file NAMES, Ctrl+Shift+P searches COMMANDS (actions), Ctrl+G jumps to a LINE NUMBER, and Ctrl+Shift+O searches SYMBOLS (functions/classes/variables) within the current file.

Is this VS Code shortcuts cheat sheet free to use?

Yes — it's 100% free with no sign-up, no login and no limits. Every shortcut and the search box work fully in your browser.

Related tools — Guides & Tutorials