I am using VIM in C ++ project development and configured the shortcurt compiler as follows
map <F4> :w<CR> :set makeprg=make<CR> :make <CR>:cw 4<CR>
which builds my project and shows a quick fix window in case of any errors.
However, this will always force vim to open the file containing the first error in my current buffer, which is annoying when the error is not logically caused by the line indicated by the compiler, but by some other piece of code in the file that is currently openened. Can I prevent VIM from switching the file with open files when switching to an error (for example, go to the first error only if it is contained in the current file, otherwise the quick delete window will simply open). In addition: can I prevent switching to the first error at all (again: just open the quick delete window)
dcn
source share