Thursday, April 4, 2013

Re: errorformat when error is not a number

On Thursday, April 4, 2013 11:13:21 AM UTC-4, Ben Fritz wrote:
> On Wednesday, April 3, 2013 5:25:04 PM UTC-5, FlashBurn wrote:
> > I have setup my errorformat quite nicely to match the compiler and lint output, however today I bumped onto a new error format:
> >
> > <offending expression>
> > ^
> > "path/to/the/file",<line number><white space>Error[Pe<error number>]:<white space><error message>v
> >
> > Vim usually displays error number next to the error, but for the error number it matches exactly that - a number. Does anybody know if there is a way to make it match also a string for error number, i.e. Pe[<error number>] so that vim could display it like
> >
> > <path to the file|<line number> col <column number> error Pe<error number>| error message
> >
> > I know how to set it up if there is no Pe in the error number, but I would like to be able to stick "Pe" between the two pipes (vertical lines).
> >
> > Any help is appreciated.
>
> Can you give an example of an error you are trying to match? Your example isn't very clear to me. It seems like you're saying you want to match lines like:
>
> /a/b/c/myfile.c,1234 Error[Pe12345]: something that has a trailing v
>
> And have Vim display:
>
> /a/b/c/myfile.c|1234 error Pe12345| something that has a trailing
>
> But you can only get it to display:
>
> /a/b/c/myfile.c|1234 error 12345| something that has a trailing
>
> Is this correct? If so, I do not think Vim can display the "Pe" within the |...| information. Is there a reason it is important? You could just match it as part of the message instead. I don't know if there is a better way to display it.

Oops, trailing v was not supposed to be there, but otherwise you were correct in what i was trying to do. There is no particular reason for displaying Pe inside the |...| I wanted to know if it was possible, and if it is why not to do it. Also I was able to match part of the error message.

Thanks for the help.

--
--
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: