:vimgrep can list search result in the Quickfix window.
:cn can jump to next matching and NORMAL window is also updated.

If switch to NORMAL window and n, it will jump to next matching place, but Quickfix windows is unchanged.

Can we make NORMAL and Quickfix window fully synchronized?

  • You can use :cn from your regular buffers, unless im wrong
    – D. Ben Knoble
    Jan 18 '18 at 11:57
  • @DavidBenKnoble If you run :cn several times and in NORMAL window you navigate to the first match, then :cn can't bring you to the second match. Basically we can't synchronise from NORMAL to Quickfix window.
    – Fisher
    Jan 18 '18 at 14:27
  • Ah. So you want to be able to detect which match you’re closest to and make :cn take you to the next? Im not sure thats at all easy... id suggest becoming familiar with (a) the various :c— commands to navigate, (b) using the quickfix window to navigate results (press <CR> and see what happens), and/or (c) using tpope’s unimpaired plugin for a good set of mappings (both for quickfix and other things). Otherwise, if you know the number, i think you can do :5cc
    – D. Ben Knoble
    Jan 18 '18 at 15:09
  • That is, i think the concepts are different from yours—the quickfix error number is intentionally quite separate from your current location in a buffer
    – D. Ben Knoble
    Jan 18 '18 at 15:10

Your Answer

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

Browse other questions tagged or ask your own question.