Re: Suggestion for a change to compiler/gcc.vim
- On 8/1/06, Nicolas Schodet <nico@...> wrote:
> * Nikolai Weibull <now@...> [060722 12:08]:Precisely the point. If Vim can't determine how the output of a
> > I am the maintainer of compiler/gcc.vim and I would like to propose
> > the following change to its errorformat:
> > @@ -20,7 +20,8 @@ setlocal errorformat=
> > \\"%f\"\\,\ line\ %l%*\\D%c%*[^\ ]\ %m,
> > \%D%*\\a[%*\\d]:\ Entering\ directory\ `%f',
> > \%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f',
> > - \%DMaking\ %*\\a\ in\ %f
> > + \%DMaking\ %*\\a\ in\ %f,
> > + \%-G%.%#
> > let &cpo = s:cpo_save
> > unlet s:cpo_save
> > The reason for this change is that I find it tiresome that whenever a
> > successful build it built, I have to press enter twice to first get
> > through the "shell output is finished, please hit Enter" prompt and
> > then "Hi, I'm gcc command-line number one that successfully compiled
> > file so and so, and hey, there are 18 more of these commands waiting
> > for you to look through, so please begin by hitting Enter".
> > So the addition of %-G%.%# to exclude anything but the defined formats
> > from the listing saves us the trouble of seeing useless compiler
> > command-lines in the list of changes.
> > However, this is a rather drastic measure, and may cause messages that
> > people rely on to go missing. If so, then this patch is perhaps not
> > for public consumption. We do have the chance to add these messages
> > to the errorformat, however, so if someone has any suggestions, please
> > do pass them on.
> > Any comments?
> This could be a quite dangerous measure as any unrecognised line will be
> totally ignored. Moreover, many Makefiles include other commands, and
> their output should generally not be lost.
command should be interpreted it should be ignored. It's as simple as
that. If you have some special needs, it really should be treated
> If you add this feature, I propose not to make it the default. ThisTrue, that could be useful, but it should be on by default.
> feature is not only useful with gcc, so the variable used to activate it
> could have a general name and be used in several compiler files.
> By the way, here is two lines coming from the default errorformatOK, I'll add them.
> \%D%*\\a:\ Entering\ directory\ `%f',
> \%X%*\\a:\ Leaving\ directory\ `%f',
> They are useful when using the -C option from the vim command line.
> What do you think of adding them?