On 8/1/06, Nicolas Schodet [EMAIL PROTECTED] wrote:
* Nikolai Weibull [EMAIL PROTECTED] [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
separately.
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.
nikolai