Skip to content

Commit

Permalink
Add Emacs keybindings to open new/close windows and quit Zed (#22629)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rosstimson authored Jan 6, 2025
1 parent 1413932 commit c968225
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion assets/keymaps/linux/emacs.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion assets/keymaps/macos/emacs.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c968225

Please sign in to comment.