How to Use the Command Palette in VS Code

The Command Palette is the fastest way to run any VS Code command from the keyboard. Learn to open it, search commands, and build keyboard-first habits.

5 min read

The Command Palette is the single fastest way to do anything in VS Code without touching a menu. Press one shortcut, type a few letters, and run any command the editor supports.

Open it with Ctrl+Shift+P on Windows and Linux, or Cmd+Shift+P on macOS.

What the Command Palette does

The Command Palette lists every available command: open settings, change the theme, install an extension, run a task, toggle a panel, format a document, and hundreds more.

The list is context-aware. If you have a Python file open, Python-specific commands appear. If a debug session is running, debug commands appear.

The input box shows a > prefix by default. This means you are searching commands. Start typing and the list filters instantly.

Running a command

Open the Command Palette

Press Ctrl+Shift+P on Windows and Linux, or Cmd+Shift+P on macOS.

Type what you want to do

Type a few letters. You do not need to type the full command name. For example, type theme to see commands related to changing the color theme.

Select the command

Use the arrow keys to highlight the command and press Enter. Or click it with the mouse.

The command runs immediately. A notification or visible change in the editor confirms the result.

Commands every beginner should know

CommandWhat it does
Preferences: Color ThemeChange the editor color theme
Preferences: Open User Settings (JSON)Open settings.json for direct editing
View: Toggle TerminalShow or hide the integrated terminal
View: Toggle Primary Side Bar VisibilityShow or hide the Primary Side Bar
File: Toggle Auto SaveToggle auto-save on or off
Developer: Reload WindowRestart the VS Code window
Git: CloneClone a Git repository
Extensions: Install ExtensionsOpen the Extensions view

Each command shows its keyboard shortcut on the right side of the list. If you use a command often, learn its shortcut so you can skip the Command Palette next time.

The Command Palette and Quick Open share the same input box. The prefix determines what you are searching:

  • > -- search commands (the default when you press Ctrl+Shift+P)
  • No prefix -- search files by name (the default when you press Ctrl+P)
  • @ -- search symbols in the current file
  • # -- search symbols across the workspace
  • : -- go to a specific line number
  • ? -- show all available prefixes

Type ? in the input box to see every prefix shortcut.

You can also switch modes mid-search. Type >, then delete it to search files. Or type @ while Quick Open is active to search symbols in the current file.

Search tips

You do not need to type the full or exact command name. The search matches partial words and abbreviations:

  • Type fmt to find Format Document
  • Type user json to find Preferences: Open User Settings (JSON)
  • Type theme to find color theme commands

The Command Palette remembers recently used commands and shows them at the top.

Repositioning the Command Palette

By default the Command Palette appears at the top center of the window. You can move it:

  • Grab the top edge with the mouse and drag it anywhere on screen
  • Select the Customize Layout control in the title bar, then choose a Quick Input Position preset

The new position persists across sessions.

Next steps

The Command Palette is for running commands. For opening files, use Quick Open. To move around your project without the mouse, learn how to split editors and manage tabs.

Rune AI

Rune AI

Key Insights

  • Open with Ctrl+Shift+P (Win/Linux) or Cmd+Shift+P (macOS).
  • Type a few letters of any command to find it. Use spaces for multi-word search.
  • The > prefix shows commands. Remove it to search files instead.
  • Each command shows its keyboard shortcut on the right. Learn shortcuts for commands you use often.
  • Type ? to see all available prefix shortcuts.
RunePowered by Rune AI

Frequently Asked Questions

What is the shortcut for the Command Palette?

Ctrl+Shift+P on Windows and Linux, Cmd+Shift+P on macOS. This opens the Command Palette with the > prefix, showing every available command.

How is the Command Palette different from Quick Open?

Quick Open (Ctrl+P / Cmd+P) opens files by name. The Command Palette (Ctrl+Shift+P / Cmd+Shift+P) shows editor commands. Both use the same input box with different prefixes. You can type > in Quick Open to switch to commands, or type a file name in the Command Palette to switch to file search.

Can I see keyboard shortcuts in the Command Palette?

Yes. Each command shows its assigned keyboard shortcut on the right side of the list. If no shortcut is assigned, only the command name appears.

Conclusion

The Command Palette puts every VS Code feature behind one keyboard shortcut. Stop looking through menus. Press Ctrl+Shift+P, type a few letters, and run the command. Build the habit and the editor becomes much faster.