I come back to kakoune from some days ago after around 4 years. I discovered lot of plug-in are now public archive (kak-tree, tagbar ...and even fzf.kak that I’m trying to make my own with color(with bat) now to find file and string( Fzf.kak with bat and line numbers - #7 by lauccode ). Can we continue to use them or should we use another one ?
Kakoune is particular for me. Because we can really connect to another tools. But for me kamp, kks, kakoune.cr are obscure plugins. I didn’t start to use them. It is a new concept for me. Do we need to use those new plugins to use Kakoune as an IDE ? Could you explain how are the usefull cases ? I need to use them to use fzf with Kakoune rather than fzf.kak ?
I have poor knows in shell and it seems it is really needed to take advantage of Kakoune. Is there some tutos to start to be able to catch well kakrc+shell and to be able to really improve kakoune the way we want ?
The reason the aforementioned plugins are archived is that @andreyorst stopped using Kakoune and, understandably, lose interest in maintaining them.
The good news is that, specif for fzf.kak there are two alternatives that come to my mind.
First, if you do want to stay with the fzf program, you can take a look at popup.kak by @enricozb (an amazing plugin by the way; congrats, Enrico!). By using it, filtering files with fzf is just a matter of calling
popup --title open --kak-script %{edit %opt{popup_output}} -- fzf
The other alternative is a plugin called Peneira, developed by me. It’s a general purpose fuzzy finder you can use for many use cases: filtering files, or lines inside a file, or jump to symbols in a source code… you can even easily define your own custom filters, like @mbauhardtdid here.
The advantage of both alternatives, compared to fzf.kak is that you don’t need to run Kakoune inside a tmux session. They are very tightly integrated in Kakoune’s UI.
Thanks !
I could install and test successfully both. Popup can be used to have fzf + ripgrep + bat calling script and it is working very well.
I like Peneira to filter in a file also with color.
I thought I could search from ripgrep with fzf-tmux by adapting the script “frf” by replacing tmux by fzf-tmux :
#!/usr/bin/env bash
# 1. Search for text in files using Ripgrep
# 2. Interactively narrow down the list using fzf
# 3. Open the file in Vim
rg --color=always --line-number --no-heading --smart-case "${*:-}" |
fzf-tmux --ansi \
--color "hl:-1:underline,hl+:-1:underline:reverse" \
--delimiter : \
--preview 'batcat --color=always {1} --highlight-line {2}' \
--preview-window 'up,60%,border-bottom,+{2}+3/3,~3' \
--bind 'enter:become(kak {1} +{2})'
And call it with : map global user -docstring 'open fuzzy grep finder (TMUX)' g ': edit %sh{frf -}<ret>'
But I don’t know how to adapt the end of “frf” script to open in already kakoune session and not trying to open new kak from terminal ?