3

I use Spacemacs, and I often use SPC b b to list buffers so that I can kill the buffers I no longer want. Unfortunately, this process takes a while because I have to repeatedly press SPC b b, navigate to a buffer I want to kill, open it, and then hit SPC b d.

I was looking for something that allows me to open up a list of buffers, in a new buffer, and quickly navigate through them and delete them easily. Kind of like Dired (in Evil mode), which allows you to use j and k to navigate through the list of files and D to delete a file.

Does something like this currently exist in Spacemacs, or in some well-known package?

3 Answers 3

8

What you want is built-in to emacs. Put (require 'ibuffer) in your config file, then bind a key to 'ibuffer:

(global-set-key "\C-x\C-b" 'ibuffer)

Be sure to check out its help documentation. It has a lot of features.

1
  • 2
    list-buffers (bound to C-x C-b in vanilla emacs) also is a possible choice.
    – JeanPierre
    Commented Dec 28, 2016 at 21:08
2

As mentioned, Ibuffer (ibuffer) and Buffer Menu (buffer-menu) are the closest to a Dired-like interface. But you can also list and act on multiple buffers using just completion.

With Icicles, commands that show you buffer names for completion let you use S-<delete> on any number of them to kill those buffer.

Similarly, C-x k (icicle-kill-buffer, in Icicle mode) lets you kill any number of buffers during the same command.

See:

0

From HELM Mini (SPC b b), you can do C-c d to kill a buffer without exiting HELM Mini.

3
  • 1
    You can also mark a buffer with C-SPC, so you can mark multiple buffers in the Helm Mini-buffer and then delete them all. This is all built into 'vanilla' spacemacs with helm.
    – mclear
    Commented Dec 29, 2016 at 4:22
  • @mclear after marking the buffers with C-SPC, how do I kill them?
    – sid-kap
    Commented Dec 29, 2016 at 22:44
  • 1
    I use Shift-option-D. If you're not on OS X it might be Shift-command-D
    – mclear
    Commented Dec 30, 2016 at 1:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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