https://github.com/vbauerster/kakoune-pokemon
surf buffers with pokemons
https://github.com/vbauerster/kakoune-pokemon
kakoune plugin
Last synced: 4 months ago
JSON representation
surf buffers with pokemons
- Host: GitHub
- URL: https://github.com/vbauerster/kakoune-pokemon
- Owner: vbauerster
- License: unlicense
- Created: 2024-03-02T04:08:33.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-11-27T07:54:52.000Z (over 1 year ago)
- Last Synced: 2025-01-09T15:46:31.548Z (over 1 year ago)
- Topics: kakoune, plugin
- Language: KakouneScript
- Homepage:
- Size: 44.9 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# kakoune-pokemon
Surf your buffers with pokemons.
## Installation
Add `pokemon.kak` to your autoload directory: `~/.config/kak/autoload/`, or source it manually.
## Features
- no persistence, yes this is a feature.
- linked list pokemons.
- optionally set/restore cursor location.
## Usage
It's highly recommended to apply default keybindings with `pokemon-keys-map` command which will add following mappings:
```
map global normal ':pokemon-open 1'
map global normal ':pokemon-open 2'
map global normal ':pokemon-open 3'
map global normal ':pokemon-open 4'
map global normal ':pokemon-open 5'
map global normal ':pokemon-open 6'
map global normal ':pokemon-open 7'
map global normal ':pokemon-open 8'
map global normal ':pokemon-open 9'
map global normal ':pokemon-open' -docstring 'open last pinned one'
```
### Index mappings behaviour
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 ``, buffer `B` by ``, and so on. Dropping buffer `B` makes `` access buffer `C` and `` becomes no-op.
### Pinning a buffer
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' -docstring 'pokemon mode'
```
### Available commands
- `pokemon-pin`: pin current buffer and enter user mode
- `pokemon-drop`: drop pokemon by index or current one if index is omitted
- `pokemon-open`: open pokemon by index or last pinned one if index is omitted
- `pokemon-prev`: goto previous pokemon if available in the current context
- `pokemon-next`: goto next pokemon if available in the current context
- `pokemon-list`: list all pokemons in the `*pokemons*` buffer
- `pokemon-keys-map`: map default keybindings
### modelinefmt tip
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} '
```
## Alternatives
[kak-harpoon](https://github.com/raiguard/kak-harpoon)