Monday, May 23, 2011

Re: quickfix, linker and erroformat

On 24/05/11 4:06 AM, cyboman wrote:
> then linker my company is using has the following error format:
>
>
> Error[e46]: message ( path\to\the\offending\file.obj )
>
> which is mapped in my errorformat as follows:
> set errorformat=%EError\[%.%n\]:\ %m\(\ %f\ \),%Z " linker error
>
> which quickfix outputs as follows
> path\to\the\offending\file.obj|| message
>
> it would be nice if quickfix could display word error between the
> vertical bars, i.e. something like this:
> path\to\the\offending\file.obj|error| message

Hmm. Strange. With that rule, I would have expected 'error' to be in the
bars. Maybe another rule is actually matching your messages, not the one
you intend? That seems unlikely too, though. Maybe it's a bug.

> it would be even better if quick fix could say:
> path\to\the\offending\file.obj|linker error| message
>
> does anybody know if there is way to make quickfix to display the word
> error or words linker error?

I think the only way you could make that happen would be to process the
quickfix buffer, e.g. using an autocommand with :au FileType qf, so that
you modify its text manually after it is loaded. It's a bit of a hack,
but it would probably work, I think. To be robust it would probably need
to use getqflist() to interpret each line of the qf window to determine
which rule it came from and then do an appropriate alteration of the
text of the line (e.g. with setline()).

Ben.

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

No comments:

Post a Comment