Let’s say I use the ag.vim plugin to search for the string disabled through multiple files. It returns me some results in the quickfix window:
1
Here's a shorter & neater version of @Kent's answer:
function! GrepQuickFix(pat)
call setqflist(filter(getqflist(), "bufname(v:val['bufnr']) !~# a:pat"))
endfunction
command! -nargs=* GrepQF call GrepQuickFix()
It is the same code, just neater and shorter, I don't believe it deserves a separate plugin.