What is the better way to search string in project?

I found the following to grep but I didn’t found a complete solution to preview and filter :

1) fzf.kak is public archive but always very good

I’m not sure it will be working in time but until now, it is.
Do you know how to filter only specific file extension by using fzf-grep ?

2) script using fzf + ripgrep

This can be found on the site of fzf.
But until now I didn’t found how to retrieve the result in kakoune
because it is sent back with extra “'” surrounding charaters.
This should be nice to be plugin independent.

https://www.reddit.com/r/kakoune/comments/17ehebv/fzf_ripgrep_bat_without_plugin/

3) grep command in kak

This is working well but there is no file preview.

For 3) it is as the quick fix list of vim but there is no preview.
With 1) and 2), At contrary, there is the preview but when the file is selected you need to search again if you want open another file of the result list.

What is the best solution to grep with preview in kak project to work efficiently with full options to filter ?
How do you use it ?

I found a solution and I explain how I do here : How to use kak_selection? - Help - Kakoune Community Hub

FWIW the way I solve this is using Kakoune-daemon with tig as my file explorer (works with git projects).

Tig integrates with git grep, has a netrw-style file explorer, staging view to access changed files and much more. The grep view also has a preview window. Since Kakoune runs in daemon mode, I can exit out of kakoune, search for a file in tig, and then reenter tig with my state remaining.

2 Likes