diff options
author | jdlugosz963 <jdlugosz963@gmail.com> | 2022-08-13 16:26:16 +0200 |
---|---|---|
committer | jdlugosz963 <jdlugosz963@gmail.com> | 2022-08-13 16:26:16 +0200 |
commit | 72c21307204f4dc6e23d667876976929ed79de03 (patch) | |
tree | c60a6e4cce02671d63165e5deb323a4f1c9b81f7 /Emacs.org | |
parent | 4a00508f8a09c6fb3b284627b65624a2f9a46916 (diff) | |
download | dotfiles-72c21307204f4dc6e23d667876976929ed79de03.tar.gz dotfiles-72c21307204f4dc6e23d667876976929ed79de03.zip |
Emacs: Add kill-other-buffers function
Diffstat (limited to 'Emacs.org')
-rw-r--r-- | Emacs.org | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -274,8 +274,16 @@ | |||
274 | 274 | ||
275 | #+begin_src emacs-lisp | 275 | #+begin_src emacs-lisp |
276 | 276 | ||
277 | (defun jd/kill-other-buffers () | ||
278 | (interactive) | ||
279 | (dolist (buffer (buffer-list)) | ||
280 | (when (not (equal (current-buffer) buffer)) | ||
281 | (kill-buffer buffer))) | ||
282 | (delete-other-windows)) | ||
283 | |||
277 | (jd/leader-key-def | 284 | (jd/leader-key-def |
278 | "bk" '(kill-this-buffer :which-key "Buffer kill")) | 285 | "bk" '(kill-this-buffer :which-key "Kill buffer") |
286 | "bK" '(jd/kill-other-buffers :which-key "Kill other buffers")) | ||
279 | 287 | ||
280 | #+end_src | 288 | #+end_src |
281 | 289 | ||