Zed Editor Keyboard Shortcuts

Complete Zed Editor keyboard shortcuts reference — 142 shortcuts across 9 categories. Quick reference cheat sheet for Mac.

Zed's default keymap borrows most single-chord bindings from VS Code and most two-key chords from Sublime and JetBrains, then adds its own vocabulary for panes, docks and syntax-aware selection. The table is the macOS keymap — Zed started there — and the Linux keymap swaps Cmd for Ctrl and Option for Alt almost everywhere.

General (16)

ShortcutAction
Cmd + Shift + PCommand Palette
Cmd + PFile Finder
Cmd + TProject Symbol Search
Cmd + OOpen
Cmd + Option + OOpen Recent Project
Cmd + SSave
Cmd + Shift + SSave As
Cmd + Option + SSave All
Cmd + K, SSave Without Formatting
Cmd + Shift + NNew Window
Cmd + Shift + WClose Window
Cmd + Option + ,Open Settings File
Cmd + K, Cmd + SOpen Keymap
Cmd + K, Cmd + TTheme Selector
Cmd + Shift + XExtensions
Cmd + QQuit

Files, Tabs & Panes (14)

ShortcutAction
Cmd + WClose Tab
Cmd + Option + TClose Other Tabs
Cmd + K, WClose All Tabs
Cmd + K, EClose Tabs to the Left
Cmd + K, TClose Tabs to the Right
Cmd + K, UClose Clean Tabs
Cmd + Shift + TReopen Closed Tab
Cmd + K, Shift + EnterPin Tab
Ctrl + TabTab Switcher
Ctrl + Shift + TabTab Switcher (Reverse)
Cmd + }Next Tab
Cmd + {Previous Tab
Cmd + K, PCopy Path
Cmd + K, RReveal in Finder

Navigation (15)

ShortcutAction
Ctrl + -Go Back
Ctrl + _Go Forward
Ctrl + GGo to Line
Cmd + Shift + OOutline
F12Go to Definition
Option + F12Go to Definition in Split
Cmd + F12Go to Type Definition
Shift + F12Go to Implementation
Option + Shift + F12Find All References
Cmd + Shift + BackspacePrevious Change
Ctrl + MMatching Bracket
Cmd + UpGo to Start of File
Cmd + DownGo to End of File
Option + LeftPrevious Word
Option + RightNext Word

Editing (25)

ShortcutAction
Cmd + ZUndo
Cmd + Shift + ZRedo
Cmd + Shift + KDelete Line
Option + UpMove Line Up
Option + DownMove Line Down
Option + Shift + UpDuplicate Line Up
Option + Shift + DownDuplicate Line Down
Ctrl + JJoin Lines
Cmd + [Outdent
Cmd + ]Indent
Cmd + /Toggle Comment
Cmd + K, Cmd + /Toggle Block Comment
Cmd + EnterNew Line Below
Cmd + Shift + EnterNew Line Above
Cmd + K, QRewrap
Cmd + K, ZToggle Soft Wrap
Cmd + BackspaceDelete to Line Start
Cmd + DeleteDelete to Line End
Option + BackspaceDelete Previous Word
Option + DeleteDelete Next Word
Ctrl + TTranspose
Cmd + Shift + IFormat
Option + Shift + OOrganize Imports
Ctrl + KCut to End of Line
Ctrl + YYank

Selection & Multi-Cursor (15)

ShortcutAction
Cmd + DSelect Next Occurrence
Cmd + K, Cmd + DSkip to Next Occurrence
Ctrl + Cmd + DSelect Previous Occurrence
Cmd + Shift + LSelect All Occurrences
Cmd + Option + UpAdd Cursor Above
Cmd + Option + DownAdd Cursor Below
Cmd + ASelect All
Cmd + LSelect Line
Ctrl + Shift + RightExpand Selection
Ctrl + Shift + LeftShrink Selection
Cmd + Ctrl + UpPrevious Syntax Node
Cmd + Ctrl + DownNext Syntax Node
Cmd + Option + ESelect Enclosing Symbol
Cmd + UUndo Selection
Cmd + Shift + URedo Selection

Search & Replace (12)

ShortcutAction
Cmd + FFind in File
Cmd + Option + FReplace in File
Cmd + Shift + FFind in Project
Cmd + Shift + HReplace in Project
Cmd + GFind Next
Cmd + Shift + GFind Previous
Cmd + EUse Selection for Find
Option + EnterSelect All Matches
Cmd + Option + XToggle Regex
Cmd + Option + CToggle Case Sensitive
Cmd + Option + WToggle Whole Word
Cmd + Option + LSearch Selection Only

Code Intelligence & Git (13)

ShortcutAction
Ctrl + SpaceShow Completions
Ctrl + Shift + SpaceWord Completions
Cmd + .Code Actions
F2Rename Symbol
Cmd + ISignature Help
Cmd + K, Cmd + IHover
F8Next Diagnostic
Shift + F8Previous Diagnostic
Cmd + Shift + MProject Diagnostics
F9Toggle Breakpoint
Cmd + Option + G, BGit Blame
Cmd + 'Toggle Diff Hunks
Cmd + Ctrl + EToggle Edit Prediction

Panels, Splits & Terminal (21)

ShortcutAction
Cmd + BToggle Left Dock
Cmd + RToggle Right Dock
Cmd + JToggle Bottom Dock
Cmd + Option + YToggle All Docks
Ctrl + `Toggle Terminal Panel
Ctrl + ~New Terminal
Cmd + Shift + EProject Panel
Cmd + Shift + BOutline Panel
Ctrl + Shift + GGit Panel
Cmd + Shift + DDebug Panel
Cmd + ?Agent Panel
Cmd + \Split Right
Cmd + K, UpSplit Up
Cmd + K, DownSplit Down
Cmd + K, LeftSplit Left
Cmd + K, RightSplit Right (Pane)
Cmd + K, Cmd + LeftFocus Pane Left
Cmd + K, Cmd + RightFocus Pane Right
Cmd + K, Cmd + UpFocus Pane Up
Cmd + K, Cmd + DownFocus Pane Down
Shift + EscToggle Zoom

Folding & Display (11)

ShortcutAction
Cmd + Option + [Fold
Cmd + Option + ]Unfold
Cmd + K, Cmd + LToggle Fold
Cmd + K, Cmd + 0Fold All
Cmd + K, Cmd + JUnfold All
Cmd + K, Cmd + 1Fold Level 1
Cmd + =Zoom In
Cmd + -Zoom Out
Cmd + 0Reset Zoom
Cmd + ;Toggle Line Numbers
Ctrl + Cmd + FToggle Full Screen
📄 View Printable Cheat Sheet — Download as PDF or print · 🧩 Combine with other tools

Related Shortcut Pages

VS Code Cursor AI Sublime Text Helix Editor Vim JetBrains Rider

Search 18,500+ shortcuts across 268 platforms

Explore All Platforms Practice Shortcuts
📜 Every shortcut on this page is taken from the official Zed Editor documentation — github.com
🔧 Spotted an error or a missing shortcut? Suggest an edit on GitHub — every accepted fix goes live on this page, the API and the CLI.

If you know VS Code

Cmd + Shift + P, Cmd + P and Cmd + Shift + F are the Command Palette, file finder and project search, exactly where VS Code puts them. Cmd + D selects the next occurrence and Cmd + Shift + L all occurrences; Cmd + Option + Up and Cmd + Option + Down add cursors. F12 goes to a definition and Option + Shift + F12 finds references. The chords starting with Cmd + K, Cmd + S (keymap) and Cmd + K, Cmd + T (theme) follow the same Cmd + K prefix convention.

What is Zed-specific

Zed selects by syntax tree, not by characters: Ctrl + Shift + Right expands the selection to the enclosing node and Ctrl + Shift + Left shrinks it, while Cmd + Ctrl + Up and Cmd + Ctrl + Down move to the previous and next sibling node. Cmd + Option + E selects the enclosing symbol — the whole function you are in. Panes and docks are first-class: Cmd + \ splits right, Cmd + K, Cmd + Left and its siblings move focus between panes, Cmd + B, Cmd + R and Cmd + J toggle the left, right and bottom docks, and Cmd + Option + Y hides all three. Shift + Esc zooms the current pane.

Terminal, git and the agent

Ctrl + ` toggles the terminal panel and Ctrl + ~ opens a new terminal in it. Ctrl + Shift + G opens the git panel, Cmd + ' toggles inline diff hunks in the editor, and Cmd + Option + G, B shows blame. Cmd + ? opens the agent panel and Cmd + Ctrl + E toggles edit prediction, Zed's inline completion. Cmd + . lists code actions from the language server and Cmd + Shift + I formats the buffer.

Frequently asked questions

Are Zed's shortcuts the same on Linux?

Mostly. The Linux keymap replaces Cmd with Ctrl and Option with Alt; a few bindings that collide with Linux conventions are remapped, and Cmd + K, Cmd + S opens the keymap on both.

How do I select the whole function I am in?

Cmd + Option + E selects the enclosing symbol. Ctrl + Shift + Right expands the selection one syntax node at a time.

What does Cmd + K followed by another key mean?

It is a two-key chord: press Cmd + K, release, then the second key. Zed uses the prefix for window, fold and pane commands.

How do I open the keymap file?

Cmd + K, Cmd + S opens your keymap.json; Cmd + Option + , opens settings.json.

🤖 Ask AI about Zed Editor shortcuts

Open your assistant with this page preloaded as the source — great for follow-up questions like "which of these work in other apps?"

ChatGPT Claude Perplexity Gemini Grok