0

I have a parser which output this kind of messages:

||     Error: M:\workdir\MyFile.ja: line 38: "Blablabla" has no license declaration
||     Error: M:\workdir\MyFile.ja: unknown attribute "blabla"
||     Fatal: M:\workdir\MyFile.ja: not generating output because of 2 earlier errors

I try to parse it with the following errorformat:

let &errorformat=&errorformat . ',' . 'Error: %f: line %l: %m'
let &errorformat=&errorformat . ',' . 'Error: %f: %m'
let &errorformat=&errorformat . ',' . 'Fatal: %f: line %l: %m'
let &errorformat=&errorformat . ',' . 'Fatal: %f: %m'

but it matches nothing. Can someone help me to points out what am I doing wrong ?

Thanks.

1

1 Answer 1

0

Ok in fact I needed to match also the leading spaces with this errorformat:

let &errorformat=&errorformat . ',' . '%*[ ]Error: %f: line %l: %m'
let &errorformat=&errorformat . ',' . '%*[ ]Error: %f: %m'
let &errorformat=&errorformat . ',' . '%*[ ]Fatal: %f: line %l: %m'
let &errorformat=&errorformat . ',' . '%*[ ]Fatal: %f: %m'

It works now like a charm !

Thanks to markzen on freenode #vim who helped me to find out the solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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