How can I start a build with my makeprg
running in a different directory than the working directory of vim and still catch errors in quickfix so that I can jump between them?
The problem is that quickfix doesn't know how to find the error locations as reported by the makeprg
due to the different paths. (The particular build system I have in mind is CMake and Ninja.)
I know that there is a path variable in Vim that to which I can add the other path. The last time I tried that it seemed less than convenient but maybe there's a good autocommand trick to fix that.
Currently I set my makeprg
to a shell script that pipes build errors through a sed
command.