aboutsummaryrefslogtreecommitdiff
path: root/zed/keymap.json
blob: ec685ebf294f7886675a7cdc56b1813a6b756d0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Zed keymap
//
// For information on binding keys, see the Zed
// documentation: https://zed.dev/docs/key-bindings
//
// To see the default key bindings run `zed: open default keymap`
// from the command palette.
[
  {
    "context": "Workspace",
    "bindings": {
      "\\ f f": "file_finder::Toggle",
      "\\ g": "workspace::NewSearch",
      "\\ b": "tab_switcher::Toggle",
      "\\ e": "project_panel::ToggleFocus",
      "\\ a": "agent::ToggleFocus",
    },
  },
  {
    "context": "Editor && vim_mode == normal",
    "bindings": {
      "g d": "editor::GoToDefinition",
      "g D": "editor::GoToDeclaration",
      "g r": "editor::FindAllReferences",
      "g i": "editor::GoToImplementation",

      "K": "editor::Hover",
      "ctrl-k": "editor::ShowSignatureHelp",

      "\\ c a": "editor::ToggleCodeActions",
      "\\ r n": "editor::Rename",
      "\\ f m": "editor::Format",

      "\\ w": "workspace::Save",
    },
  },
  {
    "context": "Editor && vim_mode == visual",
    "bindings": {
      "J": "editor::MoveLineDown",
      "K": "editor::MoveLineUp",
    },
  },
]