I love using the
:lgrep command in Vim to create a location list for the current buffer. For example I can use it with a Perl regex by doing:
:lgrep -P 'pattern' %
However, I don't like the fact that the results of the grep are displayed, obscuring my Vim session, after the grep completes. I want the results to be placed into the location list window, but for the output of the grep (to the screen) to be suppressed. Normally, after the grep is complete, Vim hides all windows and displays the results of the grep in my terminal. Then I have to
Press ENTER or type command to continue to get back to the Vim session.
This is annoying.
I usually immediately open a location list window and navigate the results using that window. I want to suppress the displaying of the grep results and then prompting me to hit ENTER to continue.
Is this possible?