jremmen / vim-ripgrep

Use RipGrep in Vim and display results in a quickfix list
MIT License
542 stars 99 forks source link

Hide rg output during search #8

Closed sirbrillig closed 6 years ago

sirbrillig commented 7 years ago

While a search is being performed, all the raw output from rg is displayed. When the search is complete, the output is parsed and moved to the quickfix window. It would improve search speed and general UX to handle the search results in the background and hide them until they are displayed in the quickfix window.

I think all this requires is the careful use of the silent command.

For an example of a similar plugin that does this, see https://github.com/rking/ag.vim

jremmen commented 6 years ago

Thanks for the suggestion, I'll take a look.

ghost commented 6 years ago

Is it same issue as #13 ?

sirbrillig commented 6 years ago

Is it same issue as #13 ?

I don't think so.

jremmen commented 6 years ago

I installed https://github.com/rking/ag.vim and noticed the output is also visible there, before the quickfix window is opened.

silent! is being used in front of the grep command here. Which is working to eliminate the "Hit Enter" prompt. I'm not sure if grep output can be hidden without causing the quickfix to also be empty. Closing for now. Will reopen if anyone has an idea or suggestion.

kkpattern commented 6 years ago

Hi, I created a pull request for this. The patch is very simple. I've tested it on Vim8.0 on Debian 8 and Windows10 and macOS High Sierra.

jremmen commented 6 years ago

Fixed by https://github.com/jremmen/vim-ripgrep/pull/27 release v1.0.1