I made a function in Vim that compiles some things for me. It looks like this:
function! MyFunc(mode) lcd ./build pwd let &makeprg='the_command some_script_file' let &errorformat='some format'.',' let &errorformat.='%-G%.%#' silent make lcd .. cwindow endfunction
I usually open vim in the project directory, then I can run this function, which cd in the assembly builds and back, so I stay in my project directory.
However, sometimes when the assembly fails and the quickfix window appears, it will show the file names relative to my dir (yay) project, but at another time in the same file it shows the absolute path. The result of the build script always shows the relative paths, and vim processes both correctly, that is, it finds the correct file.
I suspect that path processing is responding. My question is, what is the problem, and is there a better way to handle the transition to the assembly directory and vice versa? I always need relative paths.
Thanks!!
vim
Christoph
source share