emacs.json

 1// documentation: https://zed.dev/docs/key-bindings
 2//
 3// To see the default key bindings run `zed: open default keymap`
 4// from the command palette.
 5[
 6  {
 7    "context": "Editor",
 8    "bindings": {
 9      "ctrl-g": "editor::Cancel",
10      "ctrl-shift-g": "go_to_line::Toggle",
11      //"ctrl-space": "editor::SetMark",
12      "ctrl-x u": "editor::Undo",
13      "ctrl-x ctrl-u": "editor::Redo",
14      "ctrl-f": "editor::MoveRight",
15      "ctrl-b": "editor::MoveLeft",
16      "ctrl-n": "editor::MoveDown",
17      "ctrl-p": "editor::MoveUp",
18      "home": ["editor::MoveToBeginningOfLine", { "stop_at_soft_wraps": false }],
19      "end": ["editor::MoveToEndOfLine", { "stop_at_soft_wraps": false }],
20      "ctrl-a": ["editor::MoveToBeginningOfLine", { "stop_at_soft_wraps": false }],
21      "ctrl-e": ["editor::MoveToEndOfLine", { "stop_at_soft_wraps": false }],
22      "alt-f": "editor::MoveToNextSubwordEnd",
23      "alt-b": "editor::MoveToPreviousSubwordStart",
24      "ctrl-d": "editor::Delete",
25      "alt-d": "editor::DeleteToNextWordEnd",
26      "ctrl-k": "editor::CutToEndOfLine",
27      "ctrl-w": "editor::Cut",
28      "alt-w": "editor::Copy",
29      "ctrl-y": "editor::Paste",
30      "ctrl-_": "editor::Undo",
31      "ctrl-v": "editor::MovePageDown",
32      "alt-v": "editor::MovePageUp",
33      "ctrl-x ]": "editor::MoveToEnd",
34      "ctrl-x [": "editor::MoveToBeginning",
35      "ctrl-l": "editor::ScrollCursorCenterTopBottom",
36      "ctrl-s": "buffer_search::Deploy",
37      "ctrl-x ctrl-f": "file_finder::Toggle",
38      "ctrl-shift-r": "editor::Rename"
39    }
40  },
41  {
42    "context": "Workspace",
43    "bindings": {
44      "ctrl-x k": "pane::CloseActiveItem",
45      "ctrl-x ctrl-c": "workspace::CloseWindow",
46      "ctrl-x o": "workspace::ActivateNextPane",
47      "ctrl-x b": "tab_switcher::Toggle",
48      "ctrl-x 0": "pane::CloseActiveItem",
49      "ctrl-x 1": "pane::CloseInactiveItems",
50      "ctrl-x 2": "pane::SplitVertical",
51      "ctrl-x ctrl-f": "file_finder::Toggle",
52      "ctrl-x ctrl-s": "workspace::Save",
53      "ctrl-x ctrl-w": "workspace::SaveAs",
54      "ctrl-x s": "workspace::SaveAll",
55      "shift shift": "file_finder::Toggle"
56    }
57  },
58  {
59    "context": "BufferSearchBar > Editor",
60    "bindings": {
61      "ctrl-s": "search::SelectNextMatch",
62      "ctrl-r": "search::SelectPrevMatch",
63      "ctrl-g": "buffer_search::Dismiss"
64    }
65  },
66  {
67    "context": "Pane",
68    "bindings": {
69      "ctrl-alt-left": "pane::GoBack",
70      "ctrl-alt-right": "pane::GoForward"
71    }
72  }
73]