As far as I understand, right now we have one matcher for everything. This can be inconvenient for matching file paths, for example as described in https://github.com/mawww/config/blob/master/kakrc#L84 .
However the matcher is (at least for me) less satisfactory than (say) what fzf uses for match files. One specific problem that bit me is that fzf helpfully favors matching file names rather than other parts of the path, so for example if you have
foo/bar/baz # this is the file I'm looking for
bar/<tons of files here> # this is an unrelated directory with `baz` in it
fzf fill have foo/bar/baz as the first hit, while currently kak shows all the files in bar/ first. I'm sure there are other tricks that we could copy from fzf, Sublime Text, etc.
There are two options:
Other improvements that I think would greatly improve :find:
:find and :b)find can be quite slow on big codebases on some file systems (e.g. HFS)Why not use fzf to open files and change buffers?
I lean on fzf a lot in my kakoune workflow. You can see my config for it starting at https://github.com/danr/dotfiles/blob/0df570877463d75e2b291cd270219221075ffc4f/config/kak/kakrc#L471 It's hardcoded to use urxvt and meant to be used with a tiling window manager, but should be easily adapted for tmux or what have you.
I did not realize you could use fzf from within kak! I'll try it out and let you know.
The other thing that would be missing from this is the favoring of the open buffers, but that's probably bearable.
I actually recorded a short video of how I use fzf and Kakoune together should you be interested: https://vimeo.com/200792397
@danr that looks great, I didn't have the time to try it because your commands use urxvt, which I do not have on OSX. I'll try to understand them and adapt them when I have some time.
I believe the answer is that you should use a tool that runs its own matcher optimised for file paths, could we close this?
Most helpful comment
I actually recorded a short video of how I use fzf and Kakoune together should you be interested: https://vimeo.com/200792397