0

I have errors which looks like this:

[Error] Z:\absolute\file\path.cpp(42): error C2065: 'foo': undeclared identifier
[Info] Z:\another\file\path.cpp(42): error C2050: 'foo': switch expression not integral

And I used the following command:

CompilerSet errorformat=[\a\+]\ %f(%l):\ %m

But it does not appear to work. The "channel" part seems to not match (\a\+), since if I replace it with Error or Info, I capture the related lines.

1
set errorformat=[%t%*\\a]\ %f(%l):\ %m

The pattern \a\+, is equivalent to %*\\a according to :h errorformat.

However you may want to look to see if Vim already supports your compiler of choice. Do :compiler then tab complete or use <c-d> to get a list of known compilers.

  • Thanks for the response! Compiler underneath is msvc, but output altered on way out of build process. – anon Dec 8 '17 at 14:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.