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 zed repository's keymaps folder.
Custom key bindings
Accessing custom key bindings
You can open keymap.json via β + K, β + S, the command palette, or the Zed > Settings > 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.
Special Keyboard Layouts
Some people have unique and custom keyboard layouts.
For example, @TomPlanche having a French keyboard, had to type Shift-Alt-( in order to have a simple [ so he made a simple layout with those 'rules':
ΓΉ -> [, backtick -> ], Alt-[ (where [ is the old ΓΉ) -> {, Alt-] -> }.
But, it was impossible to take into account the { and } when he was typing so now, in order to ignore a binding, he can add null to the binding:
[
{
"context": "Editor",
"bindings": {
"alt-[": null,
"alt-]": null,
}
}
]
All key bindings
Global
| Command |
Target |
Default Shortcut |
| Open recent |
Branches |
Alt + β + B |
| Toggle focus |
Collab Panel |
β + Shift + C |
| Toggle inlay hints |
Editor |
Control + : |
| Cancel |
Menu |
Control + C |
| Cancel |
Menu |
Escape |
| Confirm |
Menu |
Enter |
| Secondary confirm |
Menu |
β + Enter |
| Select first |
Menu |
β + Up |
| Select first |
Menu |
Page Up |
| Select first |
Menu |
Shift + Page Down |
| Select first |
Menu |
Shift + Page Up |
| Select last |
Menu |
β + Down |
| Select last |
Menu |
Page Down |
| Select next |
Menu |
Control + N |
| Select next |
Menu |
Down |
| Select prev |
Menu |
Control + P |
| Select prev |
Menu |
Up |
| Show context menu |
Menu |
Control + Enter |
| Activate next item |
Pane |
Alt + β + Right |
| Activate next item |
Pane |
β + } |
| Activate prev item |
Pane |
Alt + β + Left |
| Activate prev item |
Pane |
β + { |
| Close active item |
Pane |
β + W |
| Close all items |
Pane |
β + K, β + W |
| Close clean items |
Pane |
β + K, U |
| Close inactive items |
Pane |
Alt + β + T |
| Open recent |
Projects |
Alt + β + O |
| Toggle focus |
Terminal Panel |
Control + ` |
| Activate pane in direction down |
Workspace |
β + K, β + Down |
| Activate pane in direction left |
Workspace |
β + K, β + Left |
| Activate pane in direction right |
Workspace |
β + K, β + Right |
| Activate pane in direction up |
Workspace |
β + K, β + Up |
| Close inactive tabs and panes |
Workspace |
Control + Alt + β + W |
| Close window |
Workspace |
β + Shift + W |
| Follow next collaborator |
Workspace |
Control + Alt + β + F |
| New file |
Workspace |
β + N |
| New terminal |
Workspace |
Control + ~ |
| New window |
Workspace |
β + Shift + N |
| Open |
Workspace |
β + O |
| Save |
Workspace |
β + S |
| Save as |
Workspace |
β + Shift + S |
| Swap pane in direction |
Workspace |
β + K, Shift + Down |
| Swap pane in direction |
Workspace |
β + K, Shift + Left |
| Swap pane in direction |
Workspace |
β + K, Shift + Right |
| Swap pane in direction |
Workspace |
β + K, Shift + Up |
| Toggle zoom |
Workspace |
Shift + Escape |
| Debug elements |
Zed |
β + Alt + I |
| Decrease buffer font size |
Zed |
β + ` |
| Hide |
Zed |
β + H |
| Hide others |
Zed |
Alt + β + H |
| Increase buffer font size |
Zed |
β + + |
| Increase buffer font size |
Zed |
β + = |
| Minimize |
Zed |
β + M |
| Open settings |
Zed |
β + , |
| Quit |
Zed |
β + Q |
| Reset buffer font size |
Zed |
β + 0 |
| Toggle full screen |
Zed |
Control + β + F |
Editor
| Command |
Target |
Default Shortcut |
| Inline assist |
Assistant |
Control + Enter |
| Add selection above |
Editor |
β + Alt + Up |
| Add selection above |
Editor |
β + Control + P |
| Add selection below |
Editor |
β + Alt + Down |
| Add selection below |
Editor |
β + Control + N |
| Backspace |
Editor |
Backspace |
| Backspace |
Editor |
Control + H |
| Backspace |
Editor |
Shift + Backspace |
| Cancel |
Editor |
Escape |
| Confirm code action |
Editor |
Enter |
| Confirm completion |
Editor |
Enter |
| Confirm completion |
Editor |
Tab |
| Confirm rename |
Editor |
Enter |
| Context menu first |
Editor |
Page Up |
| Context menu last |
Editor |
Page Down |
| Context menu next |
Editor |
Control + N |
| Context menu next |
Editor |
Down |
| Context menu prev |
Editor |
Control + P |
| Context menu prev |
Editor |
Up |
| Copy |
Editor |
β + C |
| Cut |
Editor |
β + X |
| Cut to end of line |
Editor |
Control + K |
| Delete |
Editor |
Control + D |
| Delete |
Editor |
Delete |
| Delete line |
Editor |
Control + Shift + K |
| Delete to beginning of line |
Editor |
β + Backspace |
| Delete to end of line |
Editor |
β + Delete |
| Delete to next subword end |
Editor |
Control + Alt + D |
| Delete to next subword end |
Editor |
Control + Alt + Delete |
| Delete to next word end |
Editor |
Alt + D |
| Delete to next word end |
Editor |
Alt + Delete |
| Delete to previous subword start |
Editor |
Control + Alt + Backspace |
| Delete to previous subword start |
Editor |
Control + Alt + H |
| Delete to previous word start |
Editor |
Alt + Backspace |
| Delete to previous word start |
Editor |
Alt + H |
| Duplicate line |
Editor |
β + Shift + D |
| Find all references |
Editor |
Alt + Shift + F12 |
| Fold |
Editor |
Alt + β + [ |
| Format |
Editor |
β + Shift + I |
| Go to definition |
Editor |
F12 |
| Go to definition split |
Editor |
Alt + F12 |
| Go to diagnostic |
Editor |
F8 |
| Go to hunk |
Editor |
β + F8 |
| Go to prev diagnostic |
Editor |
Shift + F8 |
| Go to prev hunk |
Editor |
β + Shift + F8 |
| Go to type definition |
Editor |
β + F12 |
| Go to type definition split |
Editor |
Alt + β + F12 |
| Hover |
Editor |
β + K, β + I |
| Indent |
Editor |
β + ] |
| Join lines |
Editor |
Control + J |
| Move down |
Editor |
Control + N |
| Move down |
Editor |
Down |
| Move left |
Editor |
Control + B |
| Move left |
Editor |
Left |
| Move line down |
Editor |
Control + β + Down |
| Move line up |
Editor |
Control + β + Up |
| Move page down |
Editor |
Control + V |
| Move page down |
Editor |
Shift + Page Down |
| Move page up |
Editor |
Alt + V |
| Move page up |
Editor |
Shift + Page Up |
| Move right |
Editor |
Control + F |
| Move right |
Editor |
Right |
| Move to beginning |
Editor |
β + Up |
| Move to beginning of line |
Editor |
β + Left |
| Move to beginning of line |
Editor |
Control + A |
| Move to beginning of line |
Editor |
Home |
| Move to enclosing bracket |
Editor |
Control + M |
| Move to end |
Editor |
β + Down |
| Move to end of line |
Editor |
β + Right |
| Move to end of line |
Editor |
Control + E |
| Move to end of line |
Editor |
End |
| Move to end of paragraph |
Editor |
Control + Down |
| Move to next subword end |
Editor |
Control + Alt + F |
| Move to next subword end |
Editor |
Control + Alt + Right |
| Move to next word end |
Editor |
Alt + F |
| Move to next word end |
Editor |
Alt + Right |
| Move to previous subword start |
Editor |
Control + Alt + B |
| Move to previous subword start |
Editor |
Control + Alt + Left |
| Move to previous word start |
Editor |
Alt + B |
| Move to previous word start |
Editor |
Alt + Left |
| Move to start of paragraph |
Editor |
Control + Up |
| Move up |
Editor |
Control + P |
| Move up |
Editor |
Up |
| Next screen |
Editor |
Control + L |
| Open excerpts |
Editor |
Alt + Enter |
| Outdent |
Editor |
β + [ |
| Page down |
Editor |
Page Down |
| Page up |
Editor |
Page Up |
| Paste |
Editor |
β + V |
| Redo |
Editor |
β + Shift + Z |
| Redo selection |
Editor |
β + Shift + U |
| Rename |
Editor |
F2 |
| Reveal in finder |
Editor |
Alt + β + R |
| Select all |
Editor |
β + A |
| Select all matches |
Editor |
β + Shift + L |
| Select down |
Editor |
Control + Shift + N |
| Select down |
Editor |
Shift + Down |
| Select larger syntax node |
Editor |
Alt + Up |
| Select left |
Editor |
Control + Shift + B |
| Select left |
Editor |
Shift + Left |
| Select line |
Editor |
β + L |
| Select next |
Editor |
β + D |
| Select next |
Editor |
β + K, β + D |
| Select previous |
Editor |
β + K, Control + β + D |
| Select previous |
Editor |
Control + β + D |
| Select right |
Editor |
Control + Shift + F |
| Select right |
Editor |
Shift + Right |
| Select smaller syntax node |
Editor |
Alt + Down |
| Select to beginning |
Editor |
β + Shift + Up |
| Select to beginning of line |
Editor |
β + Shift + Left |
| Select to beginning of line |
Editor |
Control + Shift + A |
| Select to beginning of line |
Editor |
Shift + Home |
| Select to end |
Editor |
β + Shift + Down |
| Select to end of line |
Editor |
β + Shift + Right |
| Select to end of line |
Editor |
Control + Shift + E |
| Select to end of line |
Editor |
Shift + End |
| Select to end of paragraph |
Editor |
Control + Shift + Down |
| Select to next subword end |
Editor |
Control + Alt + Shift + F |
| Select to next subword end |
Editor |
Control + Alt + Shift + Right |
| Select to next word end |
Editor |
Alt + Shift + F |
| Select to next word end |
Editor |
Alt + Shift + Right |
| Select to previous subword start |
Editor |
Control + Alt + Shift + B |
| Select to previous subword start |
Editor |
Control + Alt + Shift + Left |
| Select to previous word start |
Editor |
Alt + Shift + B |
| Select to previous word start |
Editor |
Alt + Shift + Left |
| Select to start of paragraph |
Editor |
Control + Shift + Up |
| Select up |
Editor |
Control + Shift + P |
| Select up |
Editor |
Shift + Up |
| Show character palette |
Editor |
Control + β + Space |
| Show completions |
Editor |
Control + Space |
| Tab |
Editor |
Tab |
| Tab prev |
Editor |
Shift + Tab |
| Toggle code actions |
Editor |
β + . |
| Toggle comments |
Editor |
β + / |
| Transpose |
Editor |
Control + T |
| Undo |
Editor |
β + Z |
| Undo selection |
Editor |
β + U |
| Unfold lines |
Editor |
Alt + β + ] |
Editor (Full Only)
| Command |
Target |
Default Shortcut |
| Quote selection |
Assistant |
β + > |
| Deploy |
Buffer Search |
β + E |
| Deploy |
Buffer Search |
β + F |
| Next suggestion |
Copilot |
Alt + ] |
| Previous suggestion |
Copilot |
Alt + [ |
| Suggest |
Copilot |
Alt + \ |
| Newline |
Editor |
Enter |
| Newline |
Editor |
Shift + Enter |
| Newline above |
Editor |
β + Shift + Enter |
| Newline below |
Editor |
β + Enter |
| Toggle soft wrap |
Editor |
Alt + Z |
| Toggle |
Go To Line |
Control + G |
| Toggle |
Outline |
β + Shift + O |
Editor (Auto Height Only)
| Command |
Target |
Default Shortcut |
| Newline |
Editor |
Control + Enter |
| Newline below |
Editor |
Control + Shift + Enter |
Pane
| Command |
Target |
Default Shortcut |
| Activate item 1 |
Pane |
Control + 1 |
| Activate item 2 |
Pane |
Control + 2 |
| Activate item 3 |
Pane |
Control + 3 |
| Activate item 4 |
Pane |
Control + 4 |
| Activate item 5 |
Pane |
Control + 5 |
| Activate item 6 |
Pane |
Control + 6 |
| Activate item 7 |
Pane |
Control + 7 |
| Activate item 8 |
Pane |
Control + 8 |
| Activate item 9 |
Pane |
Control + 9 |
| Activate last item |
Pane |
Control + 0 |
| Go back |
Pane |
Control + |
| Go forward |
Pane |
Control + _ |
| Reopen closed item |
Pane |
β + Shift + T |
| Split down |
Pane |
β + K, Down |
| Split left |
Pane |
β + K, Left |
| Split right |
Pane |
β + K, Right |
| Split up |
Pane |
β + K, Up |
| Toggle filters |
Project Search |
Alt + β + F |
| Toggle focus |
Project Search |
β + F |
| Toggle focus |
Project Search |
β + Shift + F |
| Activate regex mode |
Search |
Alt + β + G |
| Activate semantic mode |
Search |
Alt + β + S |
| Activate text mode |
Search |
Alt + β + X |
| Cycle mode |
Search |
Alt + Tab |
| Select all matches |
Search |
Alt + Enter |
| Select next match |
Search |
β + G |
| Select prev match |
Search |
β + Shift + G |
| Toggle case sensitive |
Search |
Alt + β + C |
| Toggle replace |
Search |
β + Shift + H |
| Toggle whole word |
Search |
Alt + β + W |
Buffer Search Bar
| Command |
Target |
Default Shortcut |
| Dismiss |
Buffer Search |
Escape |
| Focus editor |
Buffer Search |
Tab |
| Cycle mode |
Search |
Alt + Tab |
| Next history query |
Search |
Down |
| Previous history query |
Search |
Up |
| Replace all |
Search |
Command + Enter |
| Replace next |
Search |
Enter |
| Select all matches |
Search |
Alt + Enter |
| Select next match |
Search |
Enter |
| Select prev match |
Search |
Shift + Enter |
Workspace
| Command |
Target |
Default Shortcut |
| Toggle focus |
Assistant |
β + ? |
| Toggle |
Command Palette |
β + Shift + P |
| Deploy |
Diagnostics |
β + Shift + M |
| Toggle |
File Finder |
β + P |
| Toggle |
Language Selector |
β + K, M |
| Toggle focus |
Project Panel |
β + Shift + E |
| Toggle |
Project Symbols |
β + T |
| Toggle |
Theme Selector |
β + K, β + T |
| Activate pane 1 |
Workspace |
β + 1 |
| Activate pane 2 |
Workspace |
β + 2 |
| Activate pane 3 |
Workspace |
β + 3 |
| Activate pane 4 |
Workspace |
β + 4 |
| Activate pane 5 |
Workspace |
β + 5 |
| Activate pane 6 |
Workspace |
β + 6 |
| Activate pane 7 |
Workspace |
β + 7 |
| Activate pane 8 |
Workspace |
β + 8 |
| Activate pane 9 |
Workspace |
β + 9 |
| Close all docks |
Workspace |
Alt + β + Y |
| New search |
Workspace |
β + Shift + F |
| Save all |
Workspace |
β + Alt + S |
| Toggle bottom dock |
Workspace |
β + J |
| Toggle left dock |
Workspace |
β + B |
| Toggle right dock |
Workspace |
β + R |
| Open keymap |
Zed |
β + K, β + S |
Project Panel
| Command |
Target |
Default Shortcut |
| Collapse selected entry |
Project Panel |
Left |
| Copy |
Project Panel |
β + C |
| Copy path |
Project Panel |
β + Alt + C |
| Copy relative path |
Project Panel |
Alt + β + Shift + C |
| Cut |
Project Panel |
β + X |
| Delete |
Project Panel |
Backspace |
| Expand selected entry |
Project Panel |
Right |
| New directory |
Project Panel |
Alt + β + N |
| New file |
Project Panel |
Command + N |
| New search in directory |
Project Panel |
Alt + Shift + F |
| Open |
Project Panel |
Space |
| Paste |
Project Panel |
β + V |
| Rename |
Project Panel |
Enter |
| Rename |
Project Panel |
F2 |
| Reveal in finder |
Project Panel |
Alt + β + R |
Project Search Bar
| Command |
Target |
Default Shortcut |
| Search in new |
Project Search |
β + Enter |
| Toggle focus |
Project Search |
Escape |
| Activate regex mode |
Search |
Alt + β + G |
| Activate semantic mode |
Search |
Alt + β + S |
| Activate text mode |
Search |
Alt + β + X |
| Cycle mode |
Search |
Alt + Tab |
| Next history query |
Search |
Down |
| Previous history query |
Search |
Up |
| Replace all |
Search |
Command + Enter |
| Replace next |
Search |
Enter |
| Toggle replace |
Search |
β + Shift + H |
Terminal
| Command |
Target |
Default Shortcut |
| Clear |
Terminal |
β + K |
| Copy |
Terminal |
β + C |
| Delete line |
Terminal |
β + Backspace |
| Move to beginning of line |
Terminal |
β + Left |
| Move to end of line |
Terminal |
β + Right |
| Move to next word end |
Terminal |
Alt + Right |
| Move to previous word start |
Terminal |
Alt + Left |
| Paste |
Terminal |
β + V |
| Show character palette |
Terminal |
Control + β + Space |
Assistant Editor
| Command |
Target |
Default Shortcut |
| Assist |
Assistant |
β + Enter |
| Cycle message role |
Assistant |
Control + R |
| Quote selection |
Assistant |
β + > |
| Split |
Assistant |
Shift + Enter |
| Save |
Workspace |
β + S |