Hi,
This is my first week dive in Kakoune! I’m really enjoying learning Kakoune. but I didn’t find a proper plugin to manage buffers. So I made one:
https://github.com/theowenyoung/kakoune-buffer-manager/
You can use it by:
plug 'theowenyoung/kakoune-buffer-manager' config %{
map global normal <c-a-b> ': buffer-manager<ret>' -docstring 'open buffer manager'
}
Why?
First I tried kakoune-buffers, it use user-mode
to list or operate buffers, with this, I can’t see the status of buffers and switch at the same time. But I really need to know the status(is modified) of buffers when I operate them, and sometimes I need to multiple select them to close.
I think using *scratch*
is the best way to manage buffers, with this, I can use all kakoune functions to navigate buffers. Use an intuitive way to manipulate buffers.
kakoune-buffer-switcher is a similar way to do this (Actually I stole its code), but it seems not to work with the latest Kakoune, and it’s a little simple for my use case. So I developed a buffer manager, it supports multiple selections!
Usage
<ret>: open buffer
d: delete current line or selected buffers
D: force delete current line or selected buffers
<esc>: back to last buffer
q: delete all buffers
Q: force delete all buffers
e: delete other buffers except selected buffers
E: force deleted other buffers except seleted buffers
<a-d>: delete selected buffers and back
<a-D>: force deleted seleted buffers and back
<?>: toggle show help info
I just released it and haven’t done much testing yet, but it functions fine on my computer! If you have a similar need, you can play fire with it.