Zed keyboard shortcuts
Zed is a fast, collaborative code editor written in Rust, with an AI agent panel built in. Its default keys follow VS Code closely.
Most used Zed keyboard shortcuts
The Zed shortcuts worth learning first. The full list follows, grouped by task.
- Open the command paletteMacShiftCmdPWindowsCtrlShiftPLinuxCtrlShiftP
- Find a file in the projectMacCmdPWindowsCtrlPLinuxCtrlP
- Search the whole projectMacShiftCmdFWindowsCtrlShiftFLinuxCtrlShiftF
- Open or close the agent panelMacShiftCmd/WindowsCtrlShift/LinuxCtrlShift/
- Inline assist (edit with AI)MacCtrlEnterWindowsCtrlEnterLinuxCtrlEnter
- Show or hide the terminalMacCtrl`WindowsCtrl`LinuxCtrl`
- Select the next occurrenceMacCmdDWindowsCtrlDLinuxCtrlD
- Comment or uncomment linesMacCmd/WindowsCtrl/LinuxCtrl/
- Go to the definitionMacF12WindowsF12LinuxF12
- Rename the symbolMacF2WindowsF2LinuxF2
General
11 shortcuts| Action | Mac | Windows | Linux |
|---|---|---|---|
| Open the command palette | ShiftCmdP | CtrlShiftP | CtrlShiftP |
| Find a file in the project | CmdP | CtrlP | CtrlP |
| Search the whole project | ShiftCmdF | CtrlShiftF | CtrlShiftF |
| Open settings | Cmd, | Ctrl, | Ctrl, |
| Open the keymap editor | CmdK,CmdS | CtrlK,CtrlS | CtrlK,CtrlS |
| Focus the project panel | ShiftCmdE | CtrlShiftE | CtrlShiftE |
| Show or hide the left dock | CmdB | CtrlB | CtrlB |
| Show or hide the bottom dock | CmdJ | CtrlJ | CtrlJ |
| Show or hide the terminal | Ctrl` | Ctrl` | Ctrl` |
| Bigger text | Cmd= | Ctrl= | Ctrl= |
| Smaller text | Cmd- | Ctrl- | Ctrl- |
AI
3 shortcuts| Action | Mac | Windows | Linux |
|---|---|---|---|
| Open or close the agent panel | ShiftCmd/ | CtrlShift/ | CtrlShift/ |
| Inline assist (edit with AI) | CtrlEnter | CtrlEnter | CtrlEnter |
| Accept the edit prediction | Tab | Tab | Tab |
Editing
14 shortcuts| Action | Mac | Windows | Linux |
|---|---|---|---|
| Undo | CmdZ | CtrlZ | CtrlZ |
| Redo | ShiftCmdZ | CtrlShiftZ | CtrlShiftZ |
| Comment or uncomment lines | Cmd/ | Ctrl/ | Ctrl/ |
| Duplicate the line | ShiftCmdD | CtrlShiftD | CtrlShiftD |
| Delete the line | ShiftCmdK | CtrlShiftK | CtrlShiftK |
| Move the line up | Option↑ | Alt↑ | Alt↑ |
| Move the line down | Option↓ | Alt↓ | Alt↓ |
| Select the next occurrence | CmdD | CtrlD | CtrlD |
| Select every occurrence | ShiftCmdL | CtrlShiftL | CtrlShiftL |
| Format the file | ShiftCmdI | CtrlShiftI | CtrlShiftI |
| Show completions | CtrlSpace | CtrlSpace | CtrlSpace |
| Show code actions | Cmd. | Ctrl. | Ctrl. |
| Find in the file | CmdF | CtrlF | CtrlF |
| Find and replace | OptionCmdF | CtrlH | CtrlH |
Navigation
12 shortcuts| Action | Mac | Windows | Linux |
|---|---|---|---|
| Go to the definition | F12 | F12 | F12 |
| Rename the symbol | F2 | F2 | F2 |
| Go to a line | CtrlG | CtrlG | CtrlG |
| Go to a symbol in the file | ShiftCmdO | CtrlShiftO | CtrlShiftO |
| Go to a symbol in the project | CmdT | CtrlT | CtrlT |
| Next problem | F8 | F8 | F8 |
| Previous problem | ShiftF8 | ShiftF8 | ShiftF8 |
| Open the diagnostics panel | ShiftCmdM | CtrlShiftM | CtrlShiftM |
| Close the tab | CmdW | CtrlW | CtrlW |
| Reopen the closed tab | ShiftCmdT | CtrlShiftT | CtrlShiftT |
| Next tab | ShiftCmd] | CtrlShift] | CtrlShift] |
| Previous tab | ShiftCmd[ | CtrlShift[ | CtrlShift[ |
No shortcuts match. Try fewer words, the key names only, or search every app.
Show the key map: which keys Zed uses mostDarker orange = used by more shortcuts
Zed editing shortcuts: comment, duplicate and move lines
- RedoMacShiftCmdZWindowsCtrlShiftZLinuxCtrlShiftZ
- Duplicate the lineMacShiftCmdDWindowsCtrlShiftDLinuxCtrlShiftD
- Delete the lineMacShiftCmdKWindowsCtrlShiftKLinuxCtrlShiftK
- Move the line upMacOption↑WindowsAlt↑LinuxAlt↑
- Move the line downMacOption↓WindowsAlt↓LinuxAlt↓
- Select every occurrenceMacShiftCmdLWindowsCtrlShiftLLinuxCtrlShiftL
- Format the fileMacShiftCmdIWindowsCtrlShiftILinuxCtrlShiftI
- Show completionsMacCtrlSpaceWindowsCtrlSpaceLinuxCtrlSpace
- Show code actionsMacCmd.WindowsCtrl.LinuxCtrl.
Terminal, docks and AI panels in Zed
- Focus the project panelMacShiftCmdEWindowsCtrlShiftELinuxCtrlShiftE
- Show or hide the left dockMacCmdBWindowsCtrlBLinuxCtrlB
- Show or hide the bottom dockMacCmdJWindowsCtrlJLinuxCtrlJ
- Bigger textMacCmd=WindowsCtrl=LinuxCtrl=
- Smaller textMacCmd-WindowsCtrl-LinuxCtrl-
- Accept the edit predictionMacTabWindowsTabLinuxTab
- Open settingsMacCmd,WindowsCtrl,LinuxCtrl,
- Open the keymap editorMacCmdK,CmdSWindowsCtrlK,CtrlSLinuxCtrlK,CtrlS
- Vim mode
- Add "vim_mode": true to your settings (Cmd+Comma or Ctrl+Comma) to edit with Vim keys.
Zed keyboard shortcuts: questions
- Can I use VS Code keys in Zed?
- Zed's default keymap already follows VS Code for most commands. Other keymaps (JetBrains, Sublime Text, Atom, Emacs and Vim mode) are offered in the welcome screen and settings.
These are the default key bindings in Zed 0.210, as published by Zed Industries. Shortcuts that need an extension, an add-in or a changed keymap are left out. Where two combinations do the same thing, both are shown.
Single-system lists: Zed keyboard shortcuts for Mac, Zed keyboard shortcuts for Windows, Zed keyboard shortcuts for Linux.
Each shortcut has its own page with the keys for every system, related shortcuts and the same action in other apps. The printable cheat sheet fits the whole list on one or two pages.