Thursday, March 7, 2013

Confusion about 'errorformat' %> item

:help efm-%> says:

> The %> item can be used to avoid trying patterns that appear earlier in
> 'errorformat'. This is useful for patterns that match just about anything.
> For example, if the error looks like this:
>
> Error in line 123 of foo.c: ~
> unknown variable "i" ~
>
> This can be found with: >
> :set efm=xxx,%E%>Error in line %l of %f:,%Z%m
> Where "xxx" has a pattern that would also match the second line.
>
> Important: There is no memory of what part of the errorformat matched before;
> every line in the error file gets a complete new run through the error format
> lines. For example, if one has: >
> setlocal efm=aa,bb,cc,dd,ee
> Where aa, bb, etc. are error format strings. Each line of the error file will
> be matched to the pattern aa, then bb, then cc, etc. Just because cc matched
> the previous error line does _not_ mean that dd will be tried first on the
> current line, even if cc and dd are multi-line errorformat strings.

I'm confused by this. The first bit seems to say that if an item matches a
specific errorformat string marked with %>, then the next line is matched not
from the beginning of 'errorformat', but rather from the item which was matched.

But the second bit seems to contradict this, saying that all lines are matched
using the full errorformat string.

What am I missing here?

--
--
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/groups/opt_out.

No comments:

Post a Comment