junegunn / fzf.vim

fzf :heart: vim
MIT License
9.52k stars 582 forks source link

Feature Request: add a fzf#vim#buffer_grep #1497

Open nkh opened 10 months ago

nkh commented 10 months ago

These two functions are available:

I Would it be possible to get a function that greps over the contents of a buffer?

Explanation for this FR

I used https://github.com/chengzeyi/fzf-preview.vim but it only shows a preview for buffers backed by a file, Which is fine till one used vim a a man pager. So I wrote a few lines patch here https://github.com/nkh/fzf-preview.vim

Although fuzz matching work well in the man pages, actually a much better flow in the man pages, looking for options is made much simpler with a regular expression which contains the number of space to match thus removing a lot of false positives (examples most often)