Command Palette

The command palette is the fastest way to drive Slate from the keyboard. Open files, run slash commands, jump to a heading, or look up a shortcut without taking your hands off the keys.

Opening the palette

Slate is keyboard-first, and the command palette is how you keep your hands on the keys. It is one bar that does the work of a file picker, a run-command menu, an outline jump, and a help index, so you can open a file, run a command, or jump to a heading without breaking your flow. Open it from anywhere in Slate.

  • KCtrlKOpen the palette
  • PCtrlPOpen the palette (command-bar style)
  • SpaceCtrlSpaceOpen the palette
  • /Ctrl/Open with a leading / already typed for slash commands

There is also a Command icon in the title bar, just before the settings gear. Click it to open the palette with the mouse.

Press Esc once to clear what you have typed. Press it a second time to close the palette.

The four modes

The first character of your query picks the mode. Empty input shows your open tabs and recent files so the palette is useful even before you type anything.

Empty state with open tabs and recent files
esc
Open tabs
Project-Atlas.mdopen
notes.mdopen
roadmap.mdrecent
CHANGELOG.mdrecent
  • Mixed search (no prefix). Names first, then content matches across the workspace. Results are capped at 100.
  • Slash commands (/ prefix). Run a named command like /save or /view rendered.
  • Outline (# prefix). Jump to any heading in the active document.
  • Help (? prefix). Browse the shortcut cheat sheet.

Matched text is highlighted in each result. Name matches show the parent folder as a muted path (middle-ellipsised when long). Content matches show the file the line came from.

Slash commands

Type / to filter the full command list. Many commands take a parameter, separated by a space.

Slash command mode
/viewesc
Slash commands
/view renderedswitch to Reading
/view plaintextswitch to Plain
/view wysiwygswitch to WYSIWYG

Files and tabs

  • /new create a new document.
  • /open open a file or folder. With no argument, opens the native picker; with a path it opens that path. Folders are opened as workspace roots.
  • /open-folder add a folder as a workspace root.
  • /save, /save-as.
  • /clipboard open a fresh document seeded with your clipboard.
  • /close, /close-others, /close-all.
  • /next-tab, /prev-tab, /switch-to name.

Views and layout

  • /view plaintext | wysiwyg | rendered.
  • /split toggle split with preview.
  • /sidebar toggle the sidebar.
  • /outline toggle the outline panel.

Workspace

  • /add-root add a workspace root.
  • /remove-root remove a workspace root.

Appearance

  • /theme light | dark | system.
  • /typography sans-reader | sans-contrast | serif-reader | serif-contrast.
  • /zoom value, /zoom-in, /zoom-out, /zoom-reset.
  • /width narrow | wide | full.

Other

  • /jump heading, which does the same as the # mode.
  • /about, /settings.

Opening files and folders

You do not need a prefix to open a file. Type any fragment of a name and matching files across every workspace root appear at the top. Content matches follow.

  • on a file opens it.
  • on a workspace match for a directory opens that folder as a new workspace root.
  • CtrlOpen the file or content match and keep the palette open. Useful for opening several files in a row without re-triggering the palette each time.
  • Opening from a content match places the cursor on the matched line and focuses the editor when you are in Plain or WYSIWYG. Reading view scrolls to the line.

Path completion

When you are typing a path with /open (or just /-prefixed paths after a folder), the palette enters a path-completion mode and shows the contents of the current directory.

  • Tab autocompletes the highlighted segment.
  • Typing / at the end descends into the highlighted folder.
  • at a path boundary pops back up one level.
  • ~/ expands to your home folder. (Desktop only; the hosted web build has no native filesystem to expand against.)

A bare fragment with no / falls back to a recursive name search across every workspace root rather than path completion. The palette switches modes automatically based on what you typed.

View, theme, typography, zoom

The view, theme, typography, and zoom commands are live: the palette previews the change as you type the argument. If your value falls outside the supported range, an arrow shows the clamped value Slate will actually apply.

For the underlying settings these commands flip, see Themes and Appearance and Switching views.

Jumping to a heading

Type # to list every heading in the active document. Keep typing to filter by title. jumps the editor to that heading.

This is the keyboard equivalent of clicking a row in the outline panel. See the outline panel for the panel-based version.

The help cheat sheet

Type ? to open a built-in cheat sheet of Slate shortcuts. Useful when you cannot remember the chord for, say, inserting a link. For the full reference, see Keyboard Shortcuts.

Tips

  • Use and (or Tab and ⇧Tab) to move between results.
  • The four open shortcuts all do the same thing; pick whichever your hands find first.
  • /Ctrl/Best when you already know you want a slash command. The leading / is inserted for you.
  • Esc twice closes the palette; once just clears the input. This makes it safe to start over without losing your place.