You can try to make a custom function for that. E.g. using :call system("make > make.out")
run make redirecting output into a file. After that load the error file using :cf make.out
. Never tried that myself, though.
In the end, results of make
might be also simply checked by testing whether the result is there, in the file system:
:make | if !filereadable("whatever-make-was-supposed-to-create") | throw "Make failed!!!" | endif
(Here the '|' symbol is vim's command separator.) Assigning that to a keyboard shortcut would remove the need for typing.
P.S. I usually try to make my programs to produce no warnings, so I never really came across the issue. What BTW leads to another possible solution: simply remove warnings (or simply undesired output lines) using e.g. grep -v tabooword
from the make output by overriding the 'makeprg'
. What is actually described in the help: :h 'makeprg'
.
P.P.S. I got started on the VIM... Provided that you also use bash as a shell. Did you tried to add to the exit ${PIPESTATUS[0]} to the shellpipe? E.g.:
:set shellpipe=2>&1\ \|\ tee\ %s;exit\ \${PIPESTATUS[0]}
Just tested that on Debian and it worked for me. :h 'shellpipe'
for more.