Emacs 26.1. ido, smex

If I want to kill one buffer I use command C-x k

Here result: enter image description here

As result I can kill ONE desire buffer. But suppose I need to kill the next buffers:

build.gradle, approfile.json, cascade.update.txt

How I can do this quickly?

  • 1
    In ido, you can kill buffers from ido-switch-buffer (C-x b) by typing C-k while you have the desired buffer as the suggestion. – DoMiNeLa10 Nov 3 '18 at 17:15
  • It's very slow. I need by arrow to go to desire buffer and type C-k. What about if I need to delete 20 buffers with name suffix *.txt? – a_subscriber Nov 4 '18 at 8:29
  • 1
    You can narrow by typing the name of the buffer you want to switch to. – DoMiNeLa10 Nov 4 '18 at 14:51

ido isn't designed for that; use the buffer list instead. C-x C-b opens a buffer containing a list of all buffers that are open. In this buffer you can use C-k to mark buffers to be deleted, then x to delete all marked buffers. Since it's a full buffer, you can also use C-s to search it.

  • 1
    I'd suggest using ibuffer for that, as it allows to mark buffers like you'd do in dired, for instance by their file names or modes. – DoMiNeLa10 Nov 4 '18 at 14:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.