diff options
Diffstat (limited to 'Emacs.org')
-rw-r--r-- | Emacs.org | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -330,16 +330,14 @@ | |||
330 | 330 | ||
331 | #+begin_src emacs-lisp | 331 | #+begin_src emacs-lisp |
332 | 332 | ||
333 | (defun jd/kill-other-buffers () | 333 | (defun jd/kill-other-buffers () |
334 | (interactive) | 334 | (interactive) |
335 | (dolist (buffer (buffer-list)) | 335 | (mapc 'kill-buffer (cdr (buffer-list (current-buffer))))) |
336 | (when (not (equal (current-buffer) buffer)) | ||
337 | (kill-buffer buffer))) | ||
338 | (delete-other-windows)) | ||
339 | 336 | ||
340 | (jd/leader-key-def | 337 | (jd/leader-key-def |
341 | "bk" '(kill-this-buffer :which-key "Kill buffer") | ||
342 | "bK" '(jd/kill-other-buffers :which-key "Kill other buffers")) | 338 | "bK" '(jd/kill-other-buffers :which-key "Kill other buffers")) |
339 | "bk" '(kill-current-buffer :which-key "Kill buffer") | ||
340 | "bB" '(ibuffer :which-key "Open ibuffer")) | ||
343 | 341 | ||
344 | #+end_src | 342 | #+end_src |
345 | 343 | ||