Closed jedahan closed 8 years ago
I wanted to do this so I added a FuzzySearch
command which should behave similarly, except that like FuzzyOpen
it searches from the current directory. It's currently in the dev
branch if you want to try it.
So that is really cool, but works a little bit different than I anticipated: it searches the filenames as well as the contents. So if I have a file called cart.rs, and I want to search for 'cart', it shows every line in cart.rs as matching.
Another interesting thing is that the FzfGit example I showed above, I can do:
:FzfGit cart
, which will first do a full rg search for 'cart', and then in nvim, those results I can filter those results more using normal fzf. I hope this makes sense, I wish I had a gif to explain.
As far as I know, fzf works that way too, at least with the :Ag
command and the one you pasted above. Does it work differently for you? It's due to how fzf/fzy are implemented: it's just matching on a string which includes the filename and then extracts the filename from the match. I'd love to have it not match on the filename though.
The example with the pre-filtering is nice though, I can include that easily.
This is now in master, under :FuzzyGrep
, it also takes optional arguments. I'll deal with the git tree thing separately. If you are able to get fzf.vim to search without it matching on the filenames, let me know, as I haven't been able to reproduce it here.
with fzf.vim, I was able to add this:
which meant that control-s would do a search of the contents of all the git files, and then I could fuzzy find the list, and then hit enter and open the found file. what's the best way to do this with neovim-fuzzy?