How to reload config without leaving kakoune


When modifying my kakrc files, to reload my kak session with the new config I always have to quit and re-run kakoune.

Is there a way to do so without leaving kakoune?

I tried :source ~/.config/kak/kakrc but it always trigger an error command foo already defined and therefore doesn’t reload the config files. I don’t want to add -override for all my commands.


Kakoune is supposed to start quickly enough that restarting it to load a new configuration shouldn’t be a burden.

Of course, it’s not possible to guarantee that Kakoune will always start quickly (add enough plugins and anything will get slow) but the expectation is that restarts are cheap and Kakoune sessions shouldn’t build up too much state.

1 Like

If you only change a small part, you can select it and run eval %reg{.}.

I always add -override to my commands and use this pattern to only load plugins once

declare-option -hidden bool init_done
evaluate-commands %sh{
    $kak_opt_init_done && exit
    # plugin loading goes here
set-option global init_done true

The rest of my config is idempotent; if I make a change, I just source everything again. I like it a lot. It works well because my plugins seldomly change.

1 Like