Surf your buffers with pokemons.
Add pokemon.kak
to your autoload directory: ~/.config/kak/autoload/
, or source it manually.
- no persistence, yes this is a feature.
- linked list pokemons.
- optionally set/restore cursor location.
It's highly recommended to apply default keybindings with pokemon-keys-map
command which will add following mappings:
map global normal <a-1> ':pokemon-open 1<ret>'
map global normal <a-2> ':pokemon-open 2<ret>'
map global normal <a-3> ':pokemon-open 3<ret>'
map global normal <a-4> ':pokemon-open 4<ret>'
map global normal <a-5> ':pokemon-open 5<ret>'
map global normal <a-6> ':pokemon-open 6<ret>'
map global normal <a-7> ':pokemon-open 7<ret>'
map global normal <a-8> ':pokemon-open 8<ret>'
map global normal <a-9> ':pokemon-open 9<ret>'
map global normal <a-0> ':pokemon-open<ret>' -docstring 'open last pinned one'
Index mappings are self adjusted (not fixed). Let say 3 buffers named A, B, C
were pinned to the list so buffer A
can be accessed by <a-1>
, buffer B
by <a-2>
, and so on. Dropping buffer B
makes <a-2>
access buffer C
and <a-3>
becomes no-op.
It's recommended to pin a buffer via pokemon
user mode, though pokemon-pin
command can be used directly. Following is just example and is not mapped by default.
map global user s ':enter-user-mode pokemon<ret>' -docstring 'pokemon mode'
pokemon-pin
: pin current buffer and enter user modepokemon-drop
: drop pokemon by index or current one if index is omittedpokemon-open
: open pokemon by index or last pinned one if index is omittedpokemon-prev
: goto previous pokemon if available in the current contextpokemon-next
: goto next pokemon if available in the current contextpokemon-list
: list all pokemons in the*pokemons*
bufferpokemon-keys-map
: map default keybindings
Add %opt{pokemon_index}
to your modelinefmt
in order to see buffer's pin status. Value 0 means buffer isn't pinned and value greater than 0 means buffer is pinned. Following is just example:
set-option -add global modelinefmt ' p:%opt{pokemon_index} '