0

I frequently find myself going through the quick fix list, making my quick fix, with :cn and then quitting :q when I've finished ... and then :q again to also close the quickfix list.

Is there a way to 'delete current, and cnext' so that not only do I not have the list left open at the end, but I can more clearly see my progress?

0

Just don't open the quickfix list in the first place. Both :cnext & :cprev give you information like (1 of 10). And :cc will give you the current quickfix list information. You can use :clist to print out the list without opening a window.

You may need to look for :cwindow / :copen if the quickfix list is opening automatically or you copied part of your vimrc from someplace else.

For more help see:

:h quickfix
:h :cnext
:h :cc
:h :clist
:h :cwindow
:h :copen
  • This may be a good workaround for someone else, but it doesn't actually answer the question. In my main case the window is opened by a third-party plugin - I do the navigating, but not (explicitly) the window opening. – OJFord Jun 19 at 21:30
  • Do you want something like this? command Cnext try | cnext | catch /^Vim\%((\a\+)\)\=:E553:/ | cclose | echo "End of quickfix list" | endtry – Peter Rincker Jun 19 at 22:01
0

I'm afraid the only way to update the quickfix list consists in manually changing its content with setqflist().

With getqflist({'idx': 'whatever'}) you should be able to obtain the index of the current item -- If I'm not mistaken you'll then have to count entries with 'nr' field to use that index.

From here you should by now have an absolute index which you could use to clear the qflist before re-setting it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.