Interactively
This plugin makes various Kakoune 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.
Suggested configuration:
# ~/.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 <final>
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