When I compile or run a file from VIM all error references are opened in the last active buffer regardless if the file is open already in another vim tab. This behavior is very annoying.
Is there any way to force vim to behave like ':tab drop' on compile errors? (See http://vim.wikia.com/wiki/Edit_a_file_or_jump_to_it_if_already_open)
Thanks a lot for any hints!
You're looking for the 'switchbuf' option. If you set switchbuf=useopen,usetab,newtab
, then any window/tab that is already displaying the buffer with the error will be focused. If there isn't a window/tab displaying the buffer, then a new tab will be created in which to display it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With