A lesson for the less-informed: while using ido to switch buffers, you
can kill buffers with C-k.
For some reason, though, you can't bury them. C-b
seems like an obvious choice, but find your personal preference.
(add-hook'ido-setup-hook(defunendless/define-ido-bury-key()(define-keyido-completion-map(kbd"C-b")'endless/ido-bury-buffer-at-head)))(defunendless/ido-bury-buffer-at-head()"Bury the buffer at the head of `ido-matches'."(interactive)(let((enable-recursive-minibufferst)(buf(ido-name(carido-matches)))(nextbuf(cadrido-matches)))(when(get-bufferbuf);; If next match names a buffer use the buffer object;;; buffer name may be changed by packages such as;; uniquify.(when(andnextbuf(get-buffernextbuf))(setqnextbuf(get-buffernextbuf)))(bury-bufferbuf)(if(bufferpnextbuf)(setqnextbuf(buffer-namenextbuf)))(setqido-default-itemnextbufido-text-initido-textido-exit'refresh)(exit-minibuffer))))
Don't be overly impressed by the apparent robustness of the code,
it's merely an adaptation of ido-kill-buffer-at-head.
Ido Bury Buffer
30 Jun 2014, by Artur Malabarba.A lesson for the less-informed: while using ido to switch buffers, you can kill buffers with C-k.
For some reason, though, you can't bury them. C-b seems like an obvious choice, but find your personal preference.
Don't be overly impressed by the apparent robustness of the code, it's merely an adaptation of
ido-kill-buffer-at-head
.Tags: lisp, init.el, emacs,
Require Feature or Install Package »
« Meta Binds Part 1: Drunk in the Dark
Related Posts
Eval-result-overlays in Emacs-lisp in lisp
Define context-aware keys in Emacs in lisp
Using prettify-symbols in Clojure and Elisp without breaking indentation in lisp
Content © 2019, All rights reserved. Icons under CC3.0.