An open API service indexing awesome lists of open source software.

https://github.com/chambln/kakoune-interactively

Makes some Kakoune commands more friendly and interactive
https://github.com/chambln/kakoune-interactively

kakoune plugin

Last synced: 5 months ago
JSON representation

Makes some Kakoune commands more friendly and interactive

Awesome Lists containing this project

README

          

# Interactively

This plugin makes various [Kakoune](https://kakoune.org) commands more
friendly and interactive by asking questions such as ‘save changes?’ and
‘ignore write protection?’. In particular, `i-quit` saves you the
trouble of hunting down modified buffers to save (or discard) before
quitting.

[![asciicast](https://asciinema.org/a/F5UXtFxv6PjCnZnU05EFSxIzJ.svg)](https://asciinema.org/a/F5UXtFxv6PjCnZnU05EFSxIzJ)

Suggested configuration:

``` kak
# ~/.config/kak/kakrc
plug chambln/kakoune-interactively config %{
alias global cd i-change-directory
alias global db i-delete-buffer
alias global q i-quit
alias global w i-write
set-option global yes_or_no_instant true
}
```

If `yes_or_no_instant` is truthy then `yes-or-no` prompts will not wait
for ret to be pressed.

You can use `yes-or-no` to create your own interactions. Prompts happen
asynchronously, so Kakoune won’t wait for the prompt to be dismissed
before continuing with the next line of the script. To work around this,
`yes-or-no` accepts an optional parameter `` which it evaluates
after a yes or no answer is given. If the prompt is dismissed with
Esc, nothing is evaluated.

## Bugs and notes

- You can’t pass a filename to `i-write`