Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

emacs: Fix emacs in embedded terminal on Linux too (#22969)

Peter Tripp3795963cf52d
diff --git a/assets/keymaps/linux/emacs.json b/assets/keymaps/linux/emacs.json
index fed6f79d471..2060189334c 100755
--- a/assets/keymaps/linux/emacs.json
+++ b/assets/keymaps/linux/emacs.json
@@ -55,7 +55,7 @@
}
},
{
- "context": "Workspace && !Terminal",
+ "context": "Workspace",
"bindings": {
"ctrl-x ctrl-c": "zed::Quit", // save-buffers-kill-terminal
"ctrl-x 5 0": "workspace::CloseWindow", // delete-frame
@@ -72,6 +72,18 @@
"ctrl-x s": "workspace::SaveAll" // save-some-buffers
}
},
+ {
+ // Workaround to enable using emacs in the Zed terminal.
+ // Unbind so Zed ignores these keys and lets emacs handle them.
+ "context": "Terminal",
+ "bindings": {
+ "ctrl-x ctrl-c": null, // save-buffers-kill-terminal
+ "ctrl-x ctrl-f": null, // find-file
+ "ctrl-x ctrl-s": null, // save-buffer
+ "ctrl-x ctrl-w": null, // write-file
+ "ctrl-x s": null // save-some-buffers
+ }
+ },
{
"context": "BufferSearchBar > Editor",
"bindings": {