From c968225b61c627fa488c3b33fa0a7cdb2656c9d8 Mon Sep 17 00:00:00 2001 From: Ross Timson Date: Mon, 6 Jan 2025 22:02:54 +0000 Subject: [PATCH] Add Emacs keybindings to open new/close windows and quit Zed (#22629) These are more closely like default Emacs bindings. I hope such small and minor changes didn't warrant a discussion in advance. Release Notes: - Added Emacs bindings for creating a new window, closing a window, and quitting zed entirely. --- assets/keymaps/linux/emacs.json | 4 +++- assets/keymaps/macos/emacs.json | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/assets/keymaps/linux/emacs.json b/assets/keymaps/linux/emacs.json index 9b73f4c419..fed6f79d47 100755 --- a/assets/keymaps/linux/emacs.json +++ b/assets/keymaps/linux/emacs.json @@ -57,7 +57,9 @@ { "context": "Workspace && !Terminal", "bindings": { - "ctrl-x ctrl-c": "workspace::CloseWindow", // kill-emacs + "ctrl-x ctrl-c": "zed::Quit", // save-buffers-kill-terminal + "ctrl-x 5 0": "workspace::CloseWindow", // delete-frame + "ctrl-x 5 2": "workspace::NewWindow", // make-frame-command "ctrl-x o": "workspace::ActivateNextPane", // other-window "ctrl-x k": "pane::CloseActiveItem", // kill-buffer "ctrl-x 0": "pane::CloseActiveItem", // delete-window diff --git a/assets/keymaps/macos/emacs.json b/assets/keymaps/macos/emacs.json index 9b73f4c419..fed6f79d47 100755 --- a/assets/keymaps/macos/emacs.json +++ b/assets/keymaps/macos/emacs.json @@ -57,7 +57,9 @@ { "context": "Workspace && !Terminal", "bindings": { - "ctrl-x ctrl-c": "workspace::CloseWindow", // kill-emacs + "ctrl-x ctrl-c": "zed::Quit", // save-buffers-kill-terminal + "ctrl-x 5 0": "workspace::CloseWindow", // delete-frame + "ctrl-x 5 2": "workspace::NewWindow", // make-frame-command "ctrl-x o": "workspace::ActivateNextPane", // other-window "ctrl-x k": "pane::CloseActiveItem", // kill-buffer "ctrl-x 0": "pane::CloseActiveItem", // delete-window