Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When I use make into vim, with :make it automatically jump to the first error, displaying a new buffer in the current tab if needed.

I use vim with multiple tabs, most of the time the error buffer is already opened in another tab. Because of that, using :tabn or :tabp doesn't work in my case. :b# either... And the previous buffer could be the non last edited one.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

There are two ways to address this:

  1. Use :make! and vim won't switch the buffer in the first place.
  2. Set switchbuf to useopen,usetab and the implicit :cf will attempt to switch to an existing window or tab displaying the buffer.
share|improve this answer
    
switchbuf=usetab is exactly what I wanted, thanks! –  Jérôme Jan 4 '12 at 16:23

You can try CTRL-o.

I use CTRL-z before make, then fg bring vim back.

share|improve this answer
    
I am using make inside vim –  Jérôme Jan 4 '12 at 15:12

Your Answer

 
discard

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.