Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I run :make from vim and there's an error, it opens that file on the error line number in the current buffer. If possible, I would prefer it switch tabs to the file if it's already open, or make a new tab with the error file. Is this possible?

share|improve this question
up vote 3 down vote accepted

You can work with a quickfix window:

In the quickfix window, each line is one error. The line number is equal to the error number. You can use ":.cc" to jump to the error under the cursor. Hitting the Enter key or double-clicking the mouse on a line has the same effect. The file containing the error is opened in the window above the quickfix window. If there already is a window for that file, it is used instead.

(from Vim's quickfix.txt, Section 2)

Just type

:help quickfix-window

in vim to get there.

For example


opens a quickfix window.

share|improve this answer
I looked a quickfix before posting this, but your instructions make it clearer. It's probably the way to go, thanks. – Peter Zich Apr 29 '12 at 1:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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