I do not see the same vim behavior as you. When I run :grep , I still see the results in vim (not in quickfix) until the search is complete (but I cannot do anything until the search is done).
I even tried using vim vim settings or plugins:
gvim -u NONE -U NONE
If this is not your behavior, check grepprg . Default value:
:verbose set grepprg grepprg=grep -n $* /dev/null
When I use run grep -e "score" -R /etc , I see this output in vim:
:!grep -n -e "score" -R /etc /dev/null 2>&1| tee /tmp/voLcaNS/232
Your system may be missing tee , or your vim is not using it (I use Vim 7.2 on Ubuntu 10.10). tee transfers the text passed to it and writes it to a file and to standard output.
If you are looking for a way to update quickfix with search results and you do not have a lock during the search, then you can write a script that:
- looks for grep as a background process and redirects the file.
- every second until grep finishes, vim uploads the file to quickfix (
cgetfile ) (you can tell vim to do something from another process with --remote-expr )
You can try my AsyncCommand plugin to run your code. It does this, except that it only downloads the file after the search is complete.
idbrii
source share