Vim: Ignore but show pattern with errorformat?

359 Views Asked by At

My compiler generates errors on the common file:line:column message format, but my problem is that my test output includes a lot of time strings which matches this pattern. For example:

2013-01-01 01:23:00 Starting test foo

Is treated like an error in file 2013-01-01 01 on line 23 and column 00 with message Starting test foo.

I can filter out time strings using %-G and a regexp in the errorformat string, but that also removes the line from the quickfix window.

Is there a way to make cnext and cprevious skip lines matching a pattern (treating them as not-valid) but still include them in the output?

1

There are 1 best solutions below

0
On

That's tough. I would modify my 'makeprg' and either use a script wrapper or directly append a post-processing step (e.g. with sed) that defuses the dates (e.g. by replacing the : with a _ when it's surrounded by decimals).