DocsconfigurationKey Bindings

Key Bindings

Zed can be configured via a simple JSON file located at ~/.config/zed/keymap.json.

Predefined keymaps

We have a growing collection of pre-defined keymaps in our keymaps respository.

Custom key bindings

Accessing custom key bindings

You can open keymap.json via CMD + K, CMD + S, the command palette, or the Zed > Preferences > Open Key Bindings application menu item.

Adding a custom key binding

To customize key bindings, specify a context and the list of bindings to set. Re-mapping an existing binding will clobber the existing binding in favor of the custom one.

An example of adding a set of custom key bindings:

[
  {
    "context": "Editor",
    "bindings": {
      "ctrl-w": "editor::SelectLargerSyntaxNode",
      "ctrl-shift-W": "editor::SelectSmallerSyntaxNode",
      "ctrl-c": "editor::Cancel"
    }
  }
]

You can see more examples in Zed's default.json

There are some key bindings that can't be overridden; we are working on an issue surrounding this.

All Key bindings

Editor

CommandDefault Shortcut
Close focused modal or toolbarEsc
BackspaceBackspace
BackspaceShift + Backspace
BackspaceControl + H
DeleteDelete
DeleteControl + D
TabTab
BacktabShift + Tab
Cut to end of lineControl + K
TransposeControl + T
Delete to beginning of lineCommand + Backspace
Delete to end of lineCommand + Delete
Delete to previous word startAlt + Backspace
Delete to previous word endAlt + Delete
Delete to previous word startAlt + H
Move upControl + P
Move downControl + N
Move leftControl + B
Move rightControl + F
Move to previous word startAlt + Left
Move to previous word startAlt + B
Move to next word endAlt + Right
Move to next word endAlt + F
Move to beginning of lineCommand + Left
Move to beginning of lineControl + A
Move to end of lineCommand + Right
Move to end of lineControl + E
Move to beginningCommand + Up
Move to endCommand + Down
Select upShift + Up
Select upControl + Shift + P
Select downShift + Down
Select downControl + Shift + N
Select leftShift + Left
Select leftControl + Shift + B
Select rightShift +Right
Select rightControl + Shift + F
Select to previous word startAlt + Shift + Left
Select to previous word startAlt + Shift + B
Select to next word endAlt + Shift + Right
Select to next word endAlt + Shift + F
Select to beginningShift + Up
Select to endCommand + Shift + Down
Select allCommand + A
Select lineCommand + L
Select to beginning of lineCommand + Shift + Left
Select to beginning of lineControl + Shift + A
Select to end of lineCommand + Shift + Right
Select to end of lineControl + Shift + E
Page upPage Up
Page downPage Down
New lineEnter
New line belowCommand + Enter
Deploy buffer searchCommand + F
Deploy buffer searchCommand + E
InputAlt + Enter
OutdentCommand + [
IndentCommand + ]
Add selection aboveCommand + Alt + Up
Add selection aboveCommand + Control + P
Add selection belowCommand + Alt + Down
Add selection belowCommand + Control + N
Select nextCommand + D
Select nextCommand + K, Command + D
Toggle commentsCommand + /
Select larger syntax nodeAlt + Up
Select smaller syntax nodeAlt + Down
Undo selectionCommand + U
Redo selectionCommand + Shift + U
Go to next diagnosticF8
Go to previous diagnosticShift + F8
RenameF2
Go to definitionF12
Go to type definitionCommand + F12
Find all referencesAlt + Shift + F12
Move to enclosing bracketControl + M
FoldAlt + Command + [
Unfold linesAlt + Command + J
Show completionsControl + Space
Toggle code actionsCommand + -
Toggle outlineCommand + Shift + O
Toggle go to lineControl + G
Delete lineControl + Shift + K
Duplicate lineCommand + Shift + D
Split selection into linesCommand + Shift + L
Move line upControl + Command + Up
Move line downControl + Command + Down
Delete to previous subword startControl + Alt + Backspace
Delete to previous subword startControl + Alt + H
Delete to next subword endControl + Alt + Delete
Delete to next subword endControl + Alt + D
Move to previous subword startControl + Alt + Left
Move to previous subword startControl + Alt + B
Move to next subword endControl + Alt + Right
Move to next subword endControl + Alt + F
Select to previous subword startControl + Alt + Shift + Left
Select to previous subword startControl + Alt + Shift + B
Select to next subword endControl + Alt + Shift + Right
Select to next subword endControl + Alt + Shift + F
Confirm completionEnter
Confirm completionTab
Confirm code actionEnter
Open exerptsAlt + Enter

Pane

CommandDefault Shortcut
Toggle focusCommand + F
Select next matchCommand + G
Select previous matchCommand + Shift + G
Go backControl + -
Go forwardShift + Control + _
Toggle project search focusCommand + Shift + F
Activate previous paneCommand + K , Command Left
Activate next paneCommand + K , Command Right
Activate the 1st paneCommand + 1
Activate the 2nd paneCommand + 2
Activate the 3rd paneCommand + 3
Activate the 4th paneCommand + 4
Activate the 5th paneCommand + 5
Activate the 6th paneCommand + 6
Activate the 7th paneCommand + 7
Activate the 8th paneCommand + 8
Activate the 9th paneCommand + 9
Activate previous tabCommand + Shift + {
Activate previous tabAlt + Command + Left
Activate next tabCommand + Shift + }
Activate next tabAlt + Command + Right
Activate last tabControl + 0
Activate the 1st tabControl + 1
Activate the 2nd tabControl + 2
Activate the 3rd tabControl + 3
Activate the 4th tabControl + 4
Activate the 5th tabControl + 5
Activate the 6th tabControl + 6
Activate the 7th tabControl + 7
Activate the 8th tabControl + 8
Activate the 9th tabControl + 9
Split pane upCommand + K , Up
Split pane downCommand + K , Down
Split pane leftCommand + K , Left
Split pane rightCommand + K , Right

Buffer Search Bar

CommandDefault Shortcut
DismissEscape
Focus editorCommand + F
Select next matchEnter
Select previous matchShift + Enter
Search in newCommand + Enter

Workspace

CommandDefault Shortcut
Deploy project searchCommand + Shift + F
Toggle theme selctorCommand + K , Command + T
Open key mapCommand + K , Command + S
Toggle project symbolsCommand + T
Toggle file finderCommand + P
Toggle command paletteCommand + Shift + P
Deploy diagnosticsCommand + Shift + M
Save all workspaceCommand + Alt + S
Toggle left sidebarCommand + B
Toggle right sidebarCommand + Shift + B
Toggle project panel focusCommand + Shift + E
Toggle contacts panel focusCommand + Shift + C

Following

CommandDefault Shortcut
Follow next collaboratorControl + Alt + Command + F
Debug elementsCommand Alt + I

Project panel

CommandDefault Shortcut
Collapse selected entryLeft
Expand selected entryRight
RenameF2
DeleteBackspace