cwoac/nvvim

Consider replacing xapian with fzf?

Closed this issue · 2 comments

Is it possible to remove the dependency on xapian for this plugin and use fzf (fuzzy finder) instead? The trick would be getting it to return a single file output for the many hits it would get on a file.

This would also avoid the need to reindex the files manually by command when you use mobile apps to update the files (I use Dropbox to store the .md files for the plugin.).

Note: Similar project using this technique though slightly different approach:
https://github.com/Alok/notational-fzf-vim

cwoac commented

So, digging into this, afaict this would require catting or cachine all of your notes for every invocation of fzf. While possible, this seems likely to be quite the overhead.

cwoac commented

So, I've looked a little further into this.
You can approximate xapian's search by doing grep -r '' '*' | fzf +x -e, possibly with -q or --history. This does however lose part of xapian's power (as far as I cant tell, fzf doesn't do word stemming). It would remove the need to reindex, but thinking about it, adding an easier way to trigger that would get rid of most of the friction (see #47).

You could build a nv clone around fzf + vim, and it would arguably be more unixy, but that's not going to be this program.