Help and docs
Sign in

grindlemire/dotfiles code browser

master 8526099
JSON · 94 lines · 2.8 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
[
  // pane quality of life
  {
    "bindings": {
      "ctrl-h": "terminal_panel::ToggleFocus",
      "ctrl-shift-h": "workspace::ToggleBottomDock",
      "ctrl-b": "workspace::ToggleLeftDock",
      "ctrl-i": "pane::ActivateNextItem",
      "ctrl-r": "projects::OpenRecent",
      "cmd-.": "pane::GoForward",
      "cmd-,": "pane::GoBack",
      "cmd-=": "zed::IncreaseBufferFontSize",
      "cmd--": "zed::DecreaseBufferFontSize",
      "shift-cmd-,": "zed::OpenSettings",
    },
  },
  // editor quality of life
  {
    "context": "Editor",
    "bindings": {
      "ctrl-shift-.": "editor::ToggleCodeActions",
      "cmd-l": "editor::Format",
      "ctrl-e": "editor::MoveToEndOfLine",
      "ctrl-shift-e": "editor::SelectToEndOfLine",
      "ctrl-a": "editor::MoveToBeginningOfLine",
      "ctrl-shift-a": "editor::SelectToBeginningOfLine",
      "cmd-k cmd-a": "editor::SelectAll",
      "cmd-k cmd-n": "editor::Rename",
      "cmd-m": "editor::FindAllReferences",
      "shift-cmd-m": "editor::GoToImplementation",
      "cmd-i": "assistant::InlineAssist",
    },
  },
  // multibuffer quality of life
  {
    "context": "!ContextEditor > Editor && mode == full && multibuffer",
    "use_key_equivalents": true,
    "bindings": {
      "escape": "pane::CloseActiveItem",
      "cmd-m": "pane::CloseActiveItem",
      "shift-enter": "editor::OpenExcerpts",
      "shift-cmd-enter": "editor::OpenExcerptsSplit",
    },
  },
  // basic bindings
  {
    "bindings": {
      "cmd-r": "workspace::Reload",
      "cmd-k cmd-c": "workspace::CopyRelativePath",
      "shift-cmd-f": "project_search::ToggleFocus",
      "ctrl-j": "pane::ActivatePreviousItem",
      "ctrl-k": "pane::ActivateNextItem",
      "cmd-j": "pane::AlternateFile",
      "cmd-h": "pane::TogglePinTab",
      "shift-cmd-k": "workspace::ToggleRightDock",
    },
  },
  // Support ctrl-r in the terminal
  {
    "context": "Terminal",
    "bindings": {
      "ctrl-r": ["terminal::SendKeystroke", "ctrl-r"],
    },
  },
  // default to tab when accepting edit prediction from the AI
  {
    "context": "Editor && edit_prediction",
    "bindings": {
      "tab": "editor::AcceptEditPrediction",
      "shift-tab": "editor::AcceptEditPrediction",
      "ctrl-l": "editor::ComposeCompletion",
      "alt-l": null,
    },
  },
  // default to tab when accepting edit prediction from the AI
  {
    "context": "Editor && edit_prediction_conflict",
    "bindings": {
      "tab": "editor::AcceptEditPrediction",
      "shift-tab": "editor::AcceptEditPrediction",
      "ctrl-l": "editor::ComposeCompletion",
      "alt-l": null,
    },
  },
  // go up and down with j+k when searching in omnibar
  {
    "context": "Editor && mode == single_line",
    "use_key_equivalents": true,
    "bindings": {
      "ctrl-k": "menu::SelectPrevious",
      "ctrl-j": "menu::SelectNext",
    },
  },
]