I have an error message like
some text
some text
Error starts ---
error file1
message1
error file2
message 2
Error end ---
How can I parse only the contents in the error part. I want the some text ignored.
Right now for the errorformat I am using
%+C\ %.%#,%+A%f:%l:%c:\ error%.%#,%-Z%[%^\ ]
Try this
%-GError\ %.%#\ ---,ignoreError .* ---lines%Eerror\ %f,start multi-line error, get the file name%+C\ %.%#,continue multi-line error with lines beginning with a space%-G%.%#ignore all other linesThis works only if you have one error per file, error messages as
will appear as
file1 || message 1 message 2Sidenote, for testing, you can put your error message in a file named e.g.
errorfile.txt, then:set errorfile=errorfile.txtthan:cgetfile(or:cg) will read theerrorfileand parse it with yourerrorformat.:h error-file-format