I'm trying to use errorformat to shorten the code-compile-code loop. My setup is such:
- MacOS where my editor (vim) sits. Along with git, etc. Everything except the compiler (VCS).
- A Ubuntu VM that runs on the same computer.
- A folder that's shared between the two. It mounts as ~/projects/my_proj on MacOS and /media/psf/projects/my_proj on the VM.
My workflow:
- Edit code on MacOS.
- Send SSH command to VM to compile the code and dump the results in /media/psf/projects/my_proj/results:
ssh remote_user@remote_host cd /media/psf/projects/my_proj/results; vcs <options_string> -f filelist.f
- Examine results of log and edit errors.
In step #3 of the workflow above, I would like to use quickfix to scan the log file. I've found that :cfile works to load the file.
However, the compiler on the VM writes out file paths using the absolute path:
/media/psf/projects/my_proj
When I try to read this into vim on MacOS, /media/psf/projects doesn't exist. And vim cannot display the errors.
What would be the best way (vimscript? macro?) that I can preprocess the log file (replace all folder paths), spit out an intermediate logfile and run :cfile on that?