Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
emacs: Support more default keybindings (#40101)
Affonso, Guilhermecdc9728391d6
diff --git a/assets/keymaps/linux/emacs.json b/assets/keymaps/linux/emacs.jsonindex 0f936ba2f96..5b8a8e5879c 100755--- a/assets/keymaps/linux/emacs.json+++ b/assets/keymaps/linux/emacs.json@@ -11,8 +11,10 @@{"context": "Editor","bindings": {+ "alt-x": "command_palette::Toggle","ctrl-g": "editor::Cancel","ctrl-x b": "tab_switcher::Toggle", // switch-to-buffer+ "ctrl-x ctrl-b": "tab_switcher::Toggle", // list-buffers"alt-g g": "go_to_line::Toggle", // goto-line"alt-g alt-g": "go_to_line::Toggle", // goto-line"ctrl-space": "editor::SetMark", // set-mark@@ -29,6 +31,8 @@"shift-home": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": false }], // move-beginning-of-line"shift-end": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": false }], // move-end-of-line"alt-m": ["editor::MoveToBeginningOfLine", { "stop_at_soft_wraps": false, "stop_at_indent": true }], // back-to-indentation+ "alt-left": "editor::MoveToPreviousWordStart", // left-word+ "alt-right": "editor::MoveToNextWordEnd", // right-word"alt-f": "editor::MoveToNextSubwordEnd", // forward-word"alt-b": "editor::MoveToPreviousSubwordStart", // backward-word"alt-u": "editor::ConvertToUpperCase", // upcase-word@@ -43,6 +47,8 @@"ctrl-x h": "editor::SelectAll", // mark-whole-buffer"ctrl-d": "editor::Delete", // delete-char"alt-d": ["editor::DeleteToNextWordEnd", { "ignore_newlines": false, "ignore_brackets": false }], // kill-word+ "alt-backspace": "editor::DeleteToPreviousWordStart", // backward-kill-word+ "alt-delete": "editor::DeleteToPreviousWordStart", // backward-kill-word"ctrl-k": "editor::KillRingCut", // kill-line"ctrl-w": "editor::Cut", // kill-region"alt-w": "editor::Copy", // kill-ring-save@@ -52,14 +58,19 @@"ctrl-x u": "editor::Undo", // undo"alt-{": "editor::MoveToStartOfParagraph", // backward-paragraph"alt-}": "editor::MoveToEndOfParagraph", // forward-paragraph+ "ctrl-up": "editor::MoveToStartOfParagraph", // backward-paragraph+ "ctrl-down": "editor::MoveToEndOfParagraph", // forward-paragraph"ctrl-v": "editor::MovePageDown", // scroll-up"alt-v": "editor::MovePageUp", // scroll-down"ctrl-x [": "editor::MoveToBeginning", // beginning-of-buffer"ctrl-x ]": "editor::MoveToEnd", // end-of-buffer"alt-<": "editor::MoveToBeginning", // beginning-of-buffer"alt->": "editor::MoveToEnd", // end-of-buffer+ "ctrl-home": "editor::MoveToBeginning", // beginning-of-buffer+ "ctrl-end": "editor::MoveToEnd", // end-of-buffer"ctrl-l": "editor::ScrollCursorCenterTopBottom", // recenter-top-bottom"ctrl-s": "buffer_search::Deploy", // isearch-forward+ "ctrl-r": "buffer_search::Deploy", // isearch-backward"alt-^": "editor::JoinLines", // join-line"alt-q": "editor::Rewrap" // fill-paragraph}@@ -85,10 +96,19 @@"end": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": false }],"ctrl-a": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": false }],"ctrl-e": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": false }],+ "alt-m": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": false, "stop_at_indent": true }],"alt-f": "editor::SelectToNextWordEnd","alt-b": "editor::SelectToPreviousSubwordStart",+ "alt-{": "editor::SelectToStartOfParagraph",+ "alt-}": "editor::SelectToEndOfParagraph",+ "ctrl-up": "editor::SelectToStartOfParagraph",+ "ctrl-down": "editor::SelectToEndOfParagraph",+ "ctrl-x [": "editor::SelectToBeginning",+ "ctrl-x ]": "editor::SelectToEnd","alt-<": "editor::SelectToBeginning","alt->": "editor::SelectToEnd",+ "ctrl-home": "editor::SelectToBeginning",+ "ctrl-end": "editor::SelectToEnd","ctrl-g": "editor::Cancel"}},diff --git a/assets/keymaps/macos/emacs.json b/assets/keymaps/macos/emacs.jsonindex 78e22359653..da815f14cec 100755--- a/assets/keymaps/macos/emacs.json+++ b/assets/keymaps/macos/emacs.json@@ -12,8 +12,10 @@{"context": "Editor","bindings": {+ "alt-x": "command_palette::Toggle","ctrl-g": "editor::Cancel","ctrl-x b": "tab_switcher::Toggle", // switch-to-buffer+ "ctrl-x ctrl-b": "tab_switcher::Toggle", // list-buffers"alt-g g": "go_to_line::Toggle", // goto-line"alt-g alt-g": "go_to_line::Toggle", // goto-line"ctrl-space": "editor::SetMark", // set-mark@@ -30,6 +32,8 @@"shift-home": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": false }], // move-beginning-of-line"shift-end": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": false }], // move-end-of-line"alt-m": ["editor::MoveToBeginningOfLine", { "stop_at_soft_wraps": false, "stop_at_indent": true }], // back-to-indentation+ "alt-left": "editor::MoveToPreviousWordStart", // left-word+ "alt-right": "editor::MoveToNextWordEnd", // right-word"alt-f": "editor::MoveToNextSubwordEnd", // forward-word"alt-b": "editor::MoveToPreviousSubwordStart", // backward-word"alt-u": "editor::ConvertToUpperCase", // upcase-word@@ -44,6 +48,8 @@"ctrl-x h": "editor::SelectAll", // mark-whole-buffer"ctrl-d": "editor::Delete", // delete-char"alt-d": ["editor::DeleteToNextWordEnd", { "ignore_newlines": false, "ignore_brackets": false }], // kill-word+ "alt-backspace": "editor::DeleteToPreviousWordStart", // backward-kill-word+ "alt-delete": "editor::DeleteToPreviousWordStart", // backward-kill-word"ctrl-k": "editor::KillRingCut", // kill-line"ctrl-w": "editor::Cut", // kill-region"alt-w": "editor::Copy", // kill-ring-save@@ -53,14 +59,19 @@"ctrl-x u": "editor::Undo", // undo"alt-{": "editor::MoveToStartOfParagraph", // backward-paragraph"alt-}": "editor::MoveToEndOfParagraph", // forward-paragraph+ "ctrl-up": "editor::MoveToStartOfParagraph", // backward-paragraph+ "ctrl-down": "editor::MoveToEndOfParagraph", // forward-paragraph"ctrl-v": "editor::MovePageDown", // scroll-up"alt-v": "editor::MovePageUp", // scroll-down"ctrl-x [": "editor::MoveToBeginning", // beginning-of-buffer"ctrl-x ]": "editor::MoveToEnd", // end-of-buffer"alt-<": "editor::MoveToBeginning", // beginning-of-buffer"alt->": "editor::MoveToEnd", // end-of-buffer+ "ctrl-home": "editor::MoveToBeginning", // beginning-of-buffer+ "ctrl-end": "editor::MoveToEnd", // end-of-buffer"ctrl-l": "editor::ScrollCursorCenterTopBottom", // recenter-top-bottom"ctrl-s": "buffer_search::Deploy", // isearch-forward+ "ctrl-r": "buffer_search::Deploy", // isearch-backward"alt-^": "editor::JoinLines", // join-line"alt-q": "editor::Rewrap" // fill-paragraph}@@ -86,10 +97,19 @@"end": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": false }],"ctrl-a": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": false }],"ctrl-e": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": false }],+ "alt-m": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": false, "stop_at_indent": true }],"alt-f": "editor::SelectToNextWordEnd","alt-b": "editor::SelectToPreviousSubwordStart",+ "alt-{": "editor::SelectToStartOfParagraph",+ "alt-}": "editor::SelectToEndOfParagraph",+ "ctrl-up": "editor::SelectToStartOfParagraph",+ "ctrl-down": "editor::SelectToEndOfParagraph",+ "ctrl-x [": "editor::SelectToBeginning",+ "ctrl-x ]": "editor::SelectToEnd","alt-<": "editor::SelectToBeginning","alt->": "editor::SelectToEnd",+ "ctrl-home": "editor::SelectToBeginning",+ "ctrl-end": "editor::SelectToEnd","ctrl-g": "editor::Cancel"}},