Loading ...
Sorry, an error occurred while loading the content.

Re: Suggestion for a change to compiler/gcc.vim

Expand Messages
  • Nikolai Weibull
    ... Precisely the point. If Vim can t determine how the output of a command should be interpreted it should be ignored. It s as simple as that. If you have
    Message 1 of 8 , Dec 20, 2006
    • 0 Attachment
      On 8/1/06, Nicolas Schodet <nico@...> wrote:
      > * Nikolai Weibull <now@...> [060722 12:08]:
      > > 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.

      Precisely the point. If Vim can't determine how the output of a
      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. This
      > 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.

      True, that could be useful, but it should be on by default.

      > By the way, here is two lines coming from the default errorformat
      > option:
      > \%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?

      OK, I'll add them.

    Your message has been successfully submitted and would be delivered to recipients shortly.