kakoune plugin to ease navigation between opened buffers.
buffers.kak to your autoload dir:
info-buffers command. It will display an info box with a numbered list of opened buffers.
- The current buffer is prefixed by a
- The alt buffer is prefixed by a
gato reach it).
- Modified buffers are prefixed by a
If this list gets too big, decrease the
max_list_buffers option (42 entries by default).
To jump to a specific buffer index use the
buffer-by-index n command.
buffer-last to move to the ends of the list.
buffer-first-modified, jump to the first modified buffer.
To delete all buffers except the current one, use
buffer-only or the more destructive
You can also delete all buffers except the ones in the same dir as the current buffer with
All these commands are grouped in a dedicated
While opened in
lock mode, it means that you can press
n many times to cycle through your buffers.
<esc> to leave this mode.
# Suggested hook hook global WinDisplay .* info-buffers # Suggested mappings map global user b ':enter-buffers-mode<ret>' -docstring 'buffers…' map global user B ':enter-user-mode -lock buffers<ret>' -docstring 'buffers (lock)…' # Suggested aliases alias global bd delete-buffer alias global bf buffer-first alias global bl buffer-last alias global bo buffer-only alias global bo! buffer-only-force
More controversial mappings
Ask yourself: how often do you use macros? If you're like me, not so much thanks to all the cool interactive ways
to accomplish a task with Kakoune. But they waste a nice spot on the
q key! Time to free it for something else.
What about moving the
b actions, (moving word backward) here instead? It makes sense on a
q is on the left of
w which goes the opposite direction. The
e actions are now finally together
just under your left hand like the 3 musketeers.
b key is free and you can now use it for
# ciao macros map global normal ^ q map global normal <a-^> Q map global normal q b map global normal Q B map global normal <a-q> <a-b> map global normal <a-Q> <a-B> map global normal b ':enter-buffers-mode<ret>' -docstring 'buffers…' map global normal B ':enter-user-mode -lock buffers<ret>' -docstring 'buffers (lock)…'
info displayed by the
info displayed by the
Thanks a lot to danr and occivink for the original implementation: https://github.com/occivink/config/blob/master/.config/kak/buflist.kak