When I have the quickfix window open (e.g. from :grep foo<cr>:cw) I can go to the window and hit Enter and it will open the file under the cursor in an existing buffer.

Is there a way to open it in a new buffer, besides :split and then going to the quickfix window?

  • When you say buffer, I believe you mean window.
    – tommcdo
    Apr 18 '18 at 22:40
  • @tommcdo I think I mean both :) Apr 19 '18 at 19:25

see switchbuf option, see:

:h switchbuf

you may setup switchbuf as:

set switchbuf=useopen,split

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.