Wednesday, September 10, 2014

Re: Errorformat - removing useless lines

...
 
> The best I could come up with was the following:
>                 \%A>>>%.%#.,
>                 \%A%*\\d\ Errors:,
>                 \%A%*\\d\ Warnings:,
>                 \%A%*\\d\ Infos:,
>                 \%A<<<%.%#.,
>
> This works, but in the cwindow I am left with this output for each of the
> above lines:
> ||
>
> That is 2 bars with a space after them.

    That's because %A produce error lines.  Use %-G to ignore things; in
particular, %-G%.%# at the end of list ignores everything not matched up
to that point.

Thank you.

The %-G is documented in a separate section from the %E..%A... and I didn't realize that was the part to ignore matches.  There is also large set of examples between those sections.  Anyway, that is my justification for not reading it! :)

In the end I would have used the following to match each of the patterns of the lines I wished to ignore:
    \%-G>>>%.%#,
    \%-G<<<%.%#,
    \%-G%*\\d\ %*\\w:,

Instead of your more generic (ignore everything not already matched):
    \%-G%.%#,

Much appreciated.
David

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment