From a92815a6957f53a75f2dbb5f2a3c4420548f0be2 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Thu, 23 Apr 2020 13:03:51 +0200 Subject: emacs: user C-X for killing the buffer and the window MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thus moving away from the leader key and being more in sync with the default C-x which I'm already using. Signed-off-by: Miquel Sabaté Solà --- .emacs.d/init.org | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to '.emacs.d') diff --git a/.emacs.d/init.org b/.emacs.d/init.org index 447095c..84a98ef 100644 --- a/.emacs.d/init.org +++ b/.emacs.d/init.org @@ -422,10 +422,11 @@ When hacking your own theme, sometimes you want to know what face is the one tha ** General global key bindings -Now, this section is full of general miscellaneous stuff. First of all, use =kill-this-buffer= instead of =kill-buffer=, which is utterly pointless when interacting with GNU Emacs as a user. +Now, this section is full of general miscellaneous stuff. First of all, use =kill-this-buffer= instead of =kill-buffer=, which is utterly pointless when interacting with GNU Emacs as a user. Moreover, I'm using the similar @@html:C-x K@@ as a binding for killing the current buffer and window. #+BEGIN_SRC elisp - (global-set-key (kbd "C-x k") 'kill-this-buffer) +(global-set-key (kbd "C-x k") 'kill-this-buffer) +(global-set-key (kbd "C-x K") 'kill-buffer-and-window) #+END_SRC Disable @@html:C-z@@, which will be later on be picked up by =evil-mode= configuration as the escape sequence. This is here to make sure that it will be disabled even if =evil-mode= is not on. @@ -1085,7 +1086,6 @@ I start by defining the =evil-leader= package, which brings the @@html:lead |-----+-------------------------------------------------| | a | Spin up =helm-ag=. This is defined earlier. | | c | Delete the current window. | -| k | Kill the current buffer and the current window. | | v | Split the window right. | | V | Split the window right and move to it. | @@ -1099,7 +1099,6 @@ I start by defining the =evil-leader= package, which brings the @@html:lead (setq evil-leader/in-all-states 1) (evil-leader/set-key "c" 'delete-window - "k" 'kill-buffer-and-window "v" 'split-window-right "V" (lambda () (interactive) (split-window-right) (other-window 1)))) #+END_SRC -- cgit v1.2.3