I'm mostly happily using Vim for my programming. It is however annoying
that I have to press Enter twice after invoking :make.
I don't really understand what's happening, so I'll just try to describe
the symptoms:
When invoking :make it runs make and displays the results. After that
the first hit-enter prompt appears. After I hit enter the message
"(1 of X) <first line of make output>"
appears, followed by another hit-enter prompt, which is green this time.
All in all it looks like this:
----snip----
:!make 2>&1| tee /tmp/v21803/0
make: `muttrc' is up to date.
Press ENTER or type command to continue
(1 of 1): make: `muttrc' is up to date.
Press ENTER or type command to continue
----snip----
Setting shortmess to 'a' or 'atToO' does not help, set noruler and set
noshowcmd also did not help.
What did help was to set cmdheight=2. Then I only get the first prompt
and the "(1 of X) ..." message is displayed in the command-line after
returning to vim. But the second line of the command-line is empty. And
I don't want to waste precious screen space to get a line that is empty
almost all the time...
Even more strange: gvim prompts only once, but it is the second prompt,
i.e.:
----snip----
:!make 2>&1| tee /tmp/v22471/0
make: `muttrc' is up to date.
(1 of 1): make: `muttrc' is up to date.
Press ENTER or type command to continue
----snip----
Again, this prompt is green. I've found no way to disable this prompt,
even cmdheight=10 does not help.
I've invoked vim via "LANG=C vi -u NONE", so it should not be a problem
with my vimrc, right?
Oh, and I'm using the vim that came with Ubuntu 7.10 (gutsy).
Obviously, I'd like to get rid of at least one, but prefereably both
prompts, I just don't know how. Any help is greatly appreciated.
Best regards,
Mika
I wonder whether using :silent would suppress them?
:silent make
Then I guess you could do
:cabbrev make silent make
or something.
You may well need to manually redraw the screen with <C-L> or :redraw or :redraw!
to get your normal Vim screen back, though! But with a bit of work, perhaps you
could get a convenient mapping, or abbreviation, or user-command or something that
could get things done without any 'Hit Enter'.
It does surprise me a bit that none of the options you tried helped. Maybe there's
another one, or maybe it's not really possible with options. Don't know.
Ben.
Send instant messages to your online friends http://au.messenger.yahoo.com
* Ben Schmidt <mail_ben...@yahoo.com.au> [2008-01-11 12:09]:
> > Obviously, I'd like to get rid of at least one, but prefereably both
> > prompts, I just don't know how. Any help is greatly appreciated.
>
> I wonder whether using :silent would suppress them?
>
> :silent make
Yes, that did the trick, thanks a lot!
I still have the problem that the first error message is printed along
with the make output, so the cursor moves to the first error, but the
error is not displayed in the command line since it has been printed
below the make output. There's got to be something wrong with this
behavour, no?
Anyway, it's not that important, since I want to pop up the quickfix
window in case of errors anyway. I'm now using the following:
function! MyMake()
silent make
redraw!
for i in getqflist()
if i['valid']
cwin
winc p
return
endif
endfor
endfunction
I'm still new to tuning vim and writing vimscript, so I'd appreciate
comments ot better ways to do this.
Regards,
Mika