Let's say I have some file
a
asdf
b
asdf
c
and search :vimgrep /asdf/g %
, and open the quickfix list :copen
. Now I can navigate between the two results using j/k
and jump to said result using Enter
.
I find it inconvenient that we directly switch from the quickfix window to the window with the result.
So far I just mapped :cprev
and :cnext
to some keys, but I'm wondering:
Is there some other short cut that acts like hitting Enter
, but without switching to the result (i.e. staying in the quickfix list)?
<CR>:cw<CR>
). But I think your mapping of:cprev
and:cnext
is much more useful and hasslefree. Normally, specially in:grep
as opposed to:make
, user should not even care about the qflist. Just cycle through the results with proper and ample context. (In:make
, one needs to read the error message, so that's a different matter.)