Saved

Press the star next to a tool's name to save it.

All my tools

VS Code Cheat Sheet

This vs code cheat sheet lists Visual Studio Code keyboard shortcuts for general commands, editing, search, multiple cursors and files. Keys shown are for Windows and Linux; search or print it.

Restored your last values ·

Your search stays in your browser. Nothing is uploaded.

Commands

–

No commands match that search.

Recent results

This vs code cheat sheet lists the shortcuts that save the most time in Visual Studio Code. The keys are the Windows and Linux ones; on macOS, use Cmd in place of Ctrl in most of them. For the full list for your system, the official docs point to a printable Keyboard Shortcut Reference under the Help menu. [1]

How to use the vs code cheat sheet

  1. Type in the search box to filter by any word in a name, a command or its note.
  2. Choose a topic to see one group instead of the whole list.
  3. Read the command in the right-hand column and its meaning on the left.
  4. Press Print for a clean copy of whatever is shown.

What is in each topic

The vs code cheat sheet is split into 5 topics. The table shows how many entries each topic holds and which ones they are, so you can jump straight to the right group with the topic box.

TopicEntriesWhat it covers
General6command palette; quick open file; open settings; toggle sidebar; toggle terminal; keyboard shortcut reference
Editing7cut line; copy line; move line up or down; copy line down; delete line; comment a line; format document
Search and navigation6find; replace; find in files; go to line; go to symbol; go to definition
Multiple cursors4add a cursor; select next match; select all matches; cursor above or below
Windows and files5new file; save; close editor; split editor; customise shortcuts

Find any command

The Command Palette is the one shortcut to learn first. According to the key bindings page, Ctrl+Shift+P is bound to Show All Commands, which opens it, and the macOS equivalent is Shift+Cmd+P. [1] Type part of a command name and run it, so you do not need to remember a shortcut for everything. Ctrl+P opens Quick Open to jump to a file by name.

Choose Help, then Keyboard Shortcut Reference, for a condensed, printable PDF with separate Windows, macOS and Linux versions. [1]

Editing and multiple cursors

With nothing selected, Ctrl+X and Ctrl+C cut and copy the whole line. Alt+Up and Alt+Down move a line, Shift+Alt+Down copies it below, Ctrl+Shift+K deletes it, Ctrl+/ toggles a comment and Shift+Alt+F formats the document. These editing shortcuts are listed from our own working; check them against the official reference for your version.

Ctrl+D adds the next occurrence of the selected word to the selection, Ctrl+Shift+L selects every occurrence and Alt+Click adds a cursor where you click. Multiple cursors let you change several places in one go. Press Esc to go back to one cursor.

Search, navigation and customising

Ctrl+F searches the current file, Ctrl+H replaces, Ctrl+Shift+F searches the whole folder, Ctrl+G goes to a line, Ctrl+Shift+O goes to a symbol and F12 goes to a definition. Ctrl+B toggles the sidebar and Ctrl+` toggles the integrated terminal.

You can change any shortcut. Ctrl+K Ctrl+S opens the keyboard shortcuts editor. VS Code keeps your customised shortcuts in the keybindings.json file, which you can also edit directly, and it applies edits while it is running. [1] The page names a syntax error in that file as the most common reason shortcuts stop working. [1]

Who this page helps

Developers use a cheat sheet to look up a command they have not typed for a while, to learn the names of the options and to compare similar commands. Beginners can read down a topic to see what is possible, and experienced users can search for the one flag they forgot.

Tips for getting the most from the vs code cheat sheet

  • Learn the Command Palette first; it finds everything else for you.
  • Pick two or three shortcuts a week and use them until they are automatic.
  • Open the shortcuts editor to see which keys are bound on your machine, since extensions can change them.

Common mistakes

Most problems come from running a command in the wrong place or with the wrong target. Read a command before you press Enter, replace every placeholder with your own value, and try destructive commands on a test copy first. When a command behaves differently from the note, check the version you have installed and the official documentation.

Where the entries come from

Each command was checked against the documentation listed below this article. Where a command is standard but is not shown on the page we read, the article says it is our own working. Options and defaults change between releases, so run the help command for the version you have installed before you rely on a flag.

What this page does not do

It lists the commands most people need and does not try to cover every option. For the complete syntax, error messages and advanced features, open the official documentation linked in the sources, and keep it beside the cheat sheet while you learn.

Printing and checking

Filter by topic before you print if you only need one section, and the printed page will be shorter. The notes are short on purpose, so keep your textbook or the official documentation open for the full detail and for anything that changes between versions.

What next

Use this often? Add VS Code Chea to your Home screen.

Frequently asked questions

What is in this vs code cheat sheet?

Shortcuts for the Command Palette, editing lines, multiple cursors, search, navigation, files and customising your own keybindings.

How do I open the Command Palette?

Press Ctrl+Shift+P on Windows and Linux or Shift+Cmd+P on macOS to show all commands.

Do these shortcuts work on a Mac?

Mostly, with Cmd in place of Ctrl and Option in place of Alt, but some differ. Use the official Keyboard Shortcut Reference for macOS.

Where are custom shortcuts stored?

In the keybindings.json file. Open the shortcuts editor with Ctrl+K Ctrl+S to change them.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More Developer Tools