Thursday, November 12, 2015

Help with multiple multi-line error formats for different compilers

I'm trying to use efm in vim with multiple compilers each of which use multi-line error messages.  The problem I am having is that only the first error shows up in the quick fix window.  However, if change efm to only have the error format for the compiler currently being used, I see all the errors.  Here's an example:

If I have my efm set like this:

" javac
:set efm=%E\ %#[javac]\ %f:%l:\ error:\ %m,%-C%.%#,%-Z\ %#[javac]%p^
" clang
:set efm+=%E%f:%l:%c:\ error:\ %m,%-C%.%#,%-Z%p^

And I build using clang, I only see the first error in the quick fix window.  However, if I then change efm to be:

" clang
:set efm=%E%f:%l:%c:\ error:\ %m,%-C%.%#,%-Z%p^

And then I rebuild, it shows all compile errors in the quick fix window.

I'm using MacVim 7.4 on OS X Yosemite.

Any help on what I am doing wrong would be greatly appreciated!

Thanks,
Matt

No comments:

Post a Comment