Scripting Kakoune with external tools

Hi, @almr !

I’ve recently released a plugin that does precisely this on-every-keystroke job and I can say it performs very well, even better than I anticipated considering its synchronous nature and the fact that I have an old laptop. It may not be as fast as fzf on filtering results, but that’s OK since I’ve implemented that in a scripting language, not a compiled one and fzf works asynchronously.

In any case, startup speed (the topic of your commentary) is not the bottleneck. Both dash and lua start up really fast (if you use a more heavy-weighted language, like Python, startup speed may be concern, I don’t really know).

I’m not sure, but I think in this case you loose shell expansions (like $kak_buflist an all of those). Is a hypothetical %exec{} useful without the ability to inspect Kakoune’s state? It’s something to think about…

1 Like