Back to main page

Guides & Glossary

0 of 3 complete
Guide

VS Code keyboard shortcuts

The VS Code shortcuts worth knowing, in one page. This is a reference to come back to, not a list to learn — the handful you actually use will stick by themselves within a week or two.

If you only ever remember one

Make it Ctrl+Shift+P / Cmd+Shift+P. The Command Palette can run every command in VS Code by name, and it shows you the keyboard shortcut for each one as you scroll past. It is a shortcut that teaches you the other shortcuts.

The five that matter

If you learn nothing else from this page, learn these. They cover most of what you will do in a normal session.

WindowsMacWhat it does
Ctrl+Shift+PCmd+Shift+POpen the Command Palette — search every command by name
Ctrl+`Ctrl+`Open or close the terminal
Ctrl+SCmd+SSave the file you are looking at
Ctrl+ZCmd+ZUndo — works on AI edits too, one step at a time
Ctrl+PCmd+PJump to a file by typing part of its name

Moving between panels

Each of these opens a panel down the left-hand side. Pressing the same keys again closes it.

WindowsMacWhat it does
Ctrl+Shift+ECmd+Shift+EFile Explorer — your project tree
Ctrl+Shift+XCmd+Shift+XExtensions — search and install add-ons
Ctrl+Shift+GCtrl+Shift+GSource Control — see what changed, commit, push
Ctrl+Shift+FCmd+Shift+FSearch across every file in the project
Ctrl+BCmd+BHide or show the sidebar — useful on a small screen

Working in a file

Useful once you start making small edits by hand rather than asking the AI for everything.

WindowsMacWhat it does
Ctrl+FCmd+FFind something in the current file
Ctrl+/Cmd+/Comment out the selected lines (switch them off without deleting)
Alt+↑ / Alt+↓Option+↑ / Option+↓Move the current line up or down
Ctrl+WCmd+WClose the current tab
Ctrl+Shift+TCmd+Shift+TReopen the tab you just closed by accident

AI coding tools

These come from the Claude Code extension. Codex ships its own set — open the Command Palette and type its name to see them, since they change more often than VS Code's own.

WindowsMacWhat it does
Ctrl+EscCmd+EscClaude Code — jump between the editor and the Claude panel
Alt+KOption+KClaude Code — reference the lines you have selected in your prompt

Change any of them

None of these are fixed. Open the Keyboard Shortcuts editor with Ctrl+K Ctrl+S / Cmd+K Cmd+S — that means pressing the two pairs one after the other — then search for a command and click the pencil to give it different keys.

This is also where to look when a shortcut on this page does nothing: occasionally an extension, or your operating system, has claimed the same combination first.

💡

On a Mac, the symbols are the shortcuts. Menus show ⌘ for Cmd, ⇧ for Shift, ⌥ for Option and ⌃ for Control. When a menu item shows ⇧⌘P beside it, that is the same thing as Cmd+Shift+P — VS Code is telling you the shortcut every time you use the slow way.