Separate quick fix buffers for vimgrep and make

When make -ing under Vim, vimgrep files are often required. In such cases, vimgrep takes care of the quick fix buffer, so you need to redo it to see the remaining compiler errors.

Is there any way to avoid this mess?

+4
source share
1 answer

You should take a look at :cold[er] (go to the old list of errors) and :cnew[er] (go to the newer list of errors); see :h quickfix-error-lists .

Here is an idea how to integrate it:

 nnoremap <expr> <F11> (&ft=='qf' ? ":colder" : ":bprev")."\<cr>" nnoremap <expr> <F12> (&ft=='qf' ? ":cnewer" : ":bnext")."\<cr>" 

F11 (/ F12 ) will go to the previous (/ next) buffer for most buffers or to the older (/ new) list of errors in the quick fix buffer.

+6
source

All Articles