0

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
1

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
0

Another option which I find really handy is M-x kill-some-buffers. Really nice option no need for split screens or anything like that it uses the mini buffer keeping things tight, meaning that after the command is executed you won’t have to C-x o C-x k the remaining open buffer of ibuffer or the listed buffers C-x C-b

  • It's ask me for every buffer. Smt like: Buffer "xxxx" is unmodified, Kill ? . So this is not what i need. – a_subscriber Oct 11 at 11:36
  • Ok, its definitely up to your choice but you can silence that y/n predicate if you want. Also, if you already found some other solutions working better for you then there's no need to look at something else. Cheers! – Jane Dane Oct 11 at 11:57

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.