Predefined keymaps
We have a growing collection of pre-defined keymaps in our keymaps repository .
Custom key bindings
Accessing custom key bindings
You can open keymap.json via CMD + K, CMD + 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 .
All key bindings
Global
Command Target Default Shortcut Open recent Branches Alt + Command + BToggle focus Collab Panel Command + Shift + CToggle inlay hints Editor Control + :Cancel Menu Control + CCancel Menu EscapeConfirm Menu EnterSecondary confirm Menu Command + EnterSelect first Menu Command + UpSelect first Menu Page UpSelect first Menu Shift + Page DownSelect first Menu Shift + Page UpSelect last Menu Command + DownSelect last Menu Page DownSelect next Menu Control + NSelect next Menu DownSelect prev Menu Control + PSelect prev Menu UpShow context menu Menu Control + EnterActivate next item Pane Alt + Command + RightActivate next item Pane Command + }Activate prev item Pane Alt + Command + LeftActivate prev item Pane Command + {Close active item Pane Command + WClose all items Pane Command + K, Command + WClose clean items Pane Command + K, UClose inactive items Pane Alt + Command + TOpen recent Projects Alt + Command + OToggle focus Terminal Panel Control + ` Activate pane in direction down Workspace Command + K, Command + DownActivate pane in direction left Workspace Command + K, Command + LeftActivate pane in direction right Workspace Command + K, Command + RightActivate pane in direction up Workspace Command + K, Command + UpClose inactive tabs and panes Workspace Control + Alt + Command + WClose window Workspace Command + Shift + WFollow next collaborator Workspace Control + Alt + Command + FNew file Workspace Command + NNew terminal Workspace Control + ~New window Workspace Command + Shift + NOpen Workspace Command + OSave Workspace Command + SSave as Workspace Command + Shift + SSwap pane in direction Workspace Command + K, Shift + DownSwap pane in direction Workspace Command + K, Shift + LeftSwap pane in direction Workspace Command + K, Shift + RightSwap pane in direction Workspace Command + K, Shift + UpToggle zoom Workspace Shift + EscapeDebug elements Zed Command + Alt + IDecrease buffer font size Zed Command +Hide Zed Command + HHide others Zed Alt + Command + HIncrease buffer font size Zed Command + +Increase buffer font size Zed Command + =Minimize Zed Command + MOpen settings Zed Command + ,Quit Zed Command + QReset buffer font size Zed Command + 0Toggle full screen Zed Control + Command + F
Editor
Command Target Default Shortcut Inline assist Assistant Control + EnterAdd selection above Editor Command + Alt + UpAdd selection above Editor Command + Control + PAdd selection below Editor Command + Alt + DownAdd selection below Editor Command + Control + NBackspace Editor BackspaceBackspace Editor Control + HBackspace Editor Shift + BackspaceCancel Editor EscapeConfirm code action Editor EnterConfirm completion Editor EnterConfirm completion Editor TabConfirm rename Editor EnterContext menu first Editor Page UpContext menu last Editor Page DownContext menu next Editor Control + NContext menu next Editor DownContext menu prev Editor Control + PContext menu prev Editor UpCopy Editor Command + CCut Editor Command + XCut to end of line Editor Control + KDelete Editor Control + DDelete Editor DeleteDelete line Editor Control + Shift + KDelete to beginning of line Editor Command + BackspaceDelete to end of line Editor Command + DeleteDelete to next subword end Editor Control + Alt + DDelete to next subword end Editor Control + Alt + DeleteDelete to next word end Editor Alt + DDelete to next word end Editor Alt + DeleteDelete to previous subword start Editor Control + Alt + BackspaceDelete to previous subword start Editor Control + Alt + HDelete to previous word start Editor Alt + BackspaceDelete to previous word start Editor Alt + HDuplicate line Editor Command + Shift + DFind all references Editor Alt + Shift + F12Fold Editor Alt + Command + [Format Editor Command + Shift + IGo to definition Editor F12Go to definition split Editor Alt + F12Go to diagnostic Editor F8Go to hunk Editor Command + F8Go to prev diagnostic Editor Shift + F8Go to prev hunk Editor Command + Shift + F8Go to type definition Editor Command + F12Go to type definition split Editor Alt + Command + F12Hover Editor Command + K, Command + IIndent Editor Command + ]Join lines Editor Control + JMove down Editor Control + NMove down Editor DownMove left Editor Control + BMove left Editor LeftMove line down Editor Control + Command + DownMove line up Editor Control + Command + UpMove page down Editor Control + VMove page down Editor Shift + Page DownMove page up Editor Alt + VMove page up Editor Shift + Page UpMove right Editor Control + FMove right Editor RightMove to beginning Editor Command + UpMove to beginning of line Editor Command + LeftMove to beginning of line Editor Control + AMove to beginning of line Editor HomeMove to enclosing bracket Editor Control + MMove to end Editor Command + DownMove to end of line Editor Command + RightMove to end of line Editor Control + EMove to end of line Editor EndMove to end of paragraph Editor Control + DownMove to next subword end Editor Control + Alt + FMove to next subword end Editor Control + Alt + RightMove to next word end Editor Alt + FMove to next word end Editor Alt + RightMove to previous subword start Editor Control + Alt + BMove to previous subword start Editor Control + Alt + LeftMove to previous word start Editor Alt + BMove to previous word start Editor Alt + LeftMove to start of paragraph Editor Control + UpMove up Editor Control + PMove up Editor UpNext screen Editor Control + LOpen excerpts Editor Alt + EnterOutdent Editor Command + [Page down Editor Page DownPage up Editor Page UpPaste Editor Command + VRedo Editor Command + Shift + ZRedo selection Editor Command + Shift + URename Editor F2Reveal in finder Editor Alt + Command + RSelect all Editor Command + ASelect all matches Editor Command + Shift + LSelect down Editor Control + Shift + NSelect down Editor Shift + DownSelect larger syntax node Editor Alt + UpSelect left Editor Control + Shift + BSelect left Editor Shift + LeftSelect line Editor Command + LSelect next Editor Command + DSelect next Editor Command + K, Command + DSelect previous Editor Command + K, Control + Command + DSelect previous Editor Control + Command + DSelect right Editor Control + Shift + FSelect right Editor Shift + RightSelect smaller syntax node Editor Alt + DownSelect to beginning Editor Command + Shift + UpSelect to beginning of line Editor Command + Shift + LeftSelect to beginning of line Editor Control + Shift + ASelect to beginning of line Editor Shift + HomeSelect to end Editor Command + Shift + DownSelect to end of line Editor Command + Shift + RightSelect to end of line Editor Control + Shift + ESelect to end of line Editor Shift + EndSelect to end of paragraph Editor Control + Shift + DownSelect to next subword end Editor Control + Alt + Shift + FSelect to next subword end Editor Control + Alt + Shift + RightSelect to next word end Editor Alt + Shift + FSelect to next word end Editor Alt + Shift + RightSelect to previous subword start Editor Control + Alt + Shift + BSelect to previous subword start Editor Control + Alt + Shift + LeftSelect to previous word start Editor Alt + Shift + BSelect to previous word start Editor Alt + Shift + LeftSelect to start of paragraph Editor Control + Shift + UpSelect up Editor Control + Shift + PSelect up Editor Shift + UpShow character palette Editor Control + Command + SpaceShow completions Editor Control + SpaceTab Editor TabTab prev Editor Shift + TabToggle code actions Editor Command + .Toggle comments Editor Command + /Transpose Editor Control + TUndo Editor Command + ZUndo selection Editor Command + UUnfold lines Editor Alt + Command + ]
Editor (Full Only)
Command Target Default Shortcut Quote selection Assistant Command + >Deploy Buffer Search Command + EDeploy Buffer Search Command + FNext suggestion Copilot Alt + ]Previous suggestion Copilot Alt + [Suggest Copilot Alt + \Newline Editor EnterNewline Editor Shift + EnterNewline above Editor Command + Shift + EnterNewline below Editor Command + EnterToggle soft wrap Editor Alt + ZToggle Go To Line Control + GToggle Outline Command + Shift + O
Editor (Auto Height Only)
Command Target Default Shortcut Newline Editor Control + EnterNewline below Editor Control + Shift + Enter
Pane
Command Target Default Shortcut Activate item 1 Pane Control + 1Activate item 2 Pane Control + 2Activate item 3 Pane Control + 3Activate item 4 Pane Control + 4Activate item 5 Pane Control + 5Activate item 6 Pane Control + 6Activate item 7 Pane Control + 7Activate item 8 Pane Control + 8Activate item 9 Pane Control + 9Activate last item Pane Control + 0Go back Pane Control +Go forward Pane Control + _Reopen closed item Pane Command + Shift + TSplit down Pane Command + K, DownSplit left Pane Command + K, LeftSplit right Pane Command + K, RightSplit up Pane Command + K, UpToggle filters Project Search Alt + Command + FToggle focus Project Search Command + FToggle focus Project Search Command + Shift + FActivate regex mode Search Alt + Command + GActivate semantic mode Search Alt + Command + SActivate text mode Search Alt + Command + XCycle mode Search Alt + TabSelect all matches Search Alt + EnterSelect next match Search Command + GSelect prev match Search Command + Shift + GToggle case sensitive Search Alt + Command + CToggle replace Search Command + Shift + HToggle whole word Search Alt + Command + W
Buffer Search Bar
Command Target Default Shortcut Dismiss Buffer Search EscapeFocus editor Buffer Search TabCycle mode Search Alt + TabNext history query Search DownPrevious history query Search UpReplace all Search Command + EnterReplace next Search EnterSelect all matches Search Alt + EnterSelect next match Search EnterSelect prev match Search Shift + Enter
Workspace
Command Target Default Shortcut Toggle focus Assistant Command + ?Toggle Command Palette Command + Shift + PDeploy Diagnostics Command + Shift + MToggle File Finder Command + PToggle Language Selector Command + K, MToggle focus Project Panel Command + Shift + EToggle Project Symbols Command + TToggle Theme Selector Command + K, Command + TActivate pane 1 Workspace Command + 1Activate pane 2 Workspace Command + 2Activate pane 3 Workspace Command + 3Activate pane 4 Workspace Command + 4Activate pane 5 Workspace Command + 5Activate pane 6 Workspace Command + 6Activate pane 7 Workspace Command + 7Activate pane 8 Workspace Command + 8Activate pane 9 Workspace Command + 9Close all docks Workspace Alt + Command + YNew search Workspace Command + Shift + FSave all Workspace Command + Alt + SToggle bottom dock Workspace Command + JToggle left dock Workspace Command + BToggle right dock Workspace Command + ROpen keymap Zed Command + K, Command + S
Project Panel
Command Target Default Shortcut Collapse selected entry Project Panel LeftCopy Project Panel Command + CCopy path Project Panel Command + Alt + CCopy relative path Project Panel Alt + Command + Shift + CCut Project Panel Command + XDelete Project Panel BackspaceExpand selected entry Project Panel RightNew directory Project Panel Alt + Command + NNew file Project Panel Command + NNew search in directory Project Panel Alt + Shift + FOpen Project Panel SpacePaste Project Panel Command + VRename Project Panel EnterRename Project Panel F2Reveal in finder Project Panel Alt + Command + R
Project Search Bar
Command Target Default Shortcut Search in new Project Search Command + EnterToggle focus Project Search EscapeActivate regex mode Search Alt + Command + GActivate semantic mode Search Alt + Command + SActivate text mode Search Alt + Command + XCycle mode Search Alt + TabNext history query Search DownPrevious history query Search UpReplace all Search Command + EnterReplace next Search EnterToggle replace Search Command + Shift + H
Terminal
Command Target Default Shortcut Clear Terminal Command + KCopy Terminal Command + CDelete line Terminal Command + BackspaceMove to beginning of line Terminal Command + LeftMove to end of line Terminal Command + RightMove to next word end Terminal Alt + RightMove to previous word start Terminal Alt + LeftPaste Terminal Command + VShow character palette Terminal Control + Command + Space
Assistant Editor
Command Target Default Shortcut Assist Assistant Command + EnterCycle message role Assistant Control + RQuote selection Assistant Command + >Split Assistant Shift + EnterSave Workspace Command + S