How do I disable the “Press ENTER or type command to continue” prompt in Vim?


How do I disable the “Press ENTER or type command to continue” prompt in Vim?



Is there any way to disable the "Press ENTER or type command to continue" prompt that appears after executing an external command?

EDIT: Found a workaround: Add an extra <CR> to the shortcut in my .lvimrc.

map <F5> :wall!<CR>:!sbcl --load foo.cl<CR><CR> 

Any better ideas?




How do I get Vim Omni Completion working in Makefiles?

1:



How to edit multi-gigabyte text files? Vim doesn't work =( [closed]
I'm not sure how to do it globally though for one command:.
Easily open include filenames in vim?
:silent !<command> 
Be sure to include a space after silent.
Yank file name / path of current buffer in Vim


Why doesn't Vims errorformat take regular expressions?


Detect file change, offer to reload file

2:



vim: associate extension with language
Found out one workaround: Add an extra <CR> to the map command..
Commenting out XML in vim
map <F5> :wall!<CR>:!sbcl --load foo.cl<CR><CR> 


3:


:help hit-enter 


4:


This is how I dealt with the problem that running an external program through silent messes up the screen in text-mode vim (in my experience, gvim doesn't suffer from this problem):.
command! -nargs=1 Silent \ | execute ':silent !'.<q-args> \ | execute ':redraw!' 
Use it instead of the regular silent command:.
:Silent top 


5:


It is possibly a syntax error in vimrc file .


6:


The solution that worked for me was setting the cmdheight to 2, in my vimrc like so:.
:set cmdheight=2 
Found the solution from this answer.

I'm sure most people already have it set to 2 height already though..


7:


The answer by anthony took me to the right place and I was able to configure gvim not to stop on a lot of messages.
I added set shortmess=aoOtI to my gvimrc file.
It is explained in the help page brought to you by :help shortmess.
The letters mean classes of messages you don't want to see, or would like vim to truncate to avoid the hit enter stop.
I managed this before by setting a wide initial window with columns=130 in gvimrc so few messages would overflow it and require the annoying, exhausting, need to hit enter.

.


8:


Putting a redraw before the screen clear works too.

Here's what I had:.
exe 'ls'   exe 'b4'  "This redraws, so the Prompt is triggered 
But this won't trigger prompt:.
exe 'ls'   redraw   exe 'b4' 


9:


This is how I run external commands in tricky scenarios without having "Press ENTER".

Unlike :silent, I can still see the command output.. Command line.
:exe ":!<command>" | redraw 
Script / function.
exe ':!<command>'  redraw 
Mapping with <expr>.
map <expr> <F5> ":exe ':!<command>'\n:redraw\<CR>" 
Mapping with <expr> that calls a function.
map <expr> <F5> MyFoo() fu! MyFoo()     return ":exe ':!<command>' | redraw\<CR>" endf 


10:


You can use:.
call feedkeys(" ") 
For example:.
function! Interactive_Questions()     echo "Question 1:"     let response1 = getchar()     echo "Question 2:"     let response2 = getchar()      " Do something      " Without the next line, you would have to hit ENTER,     " even if what is written (the questions) has no interest:     call feedkeys(" ") endf 



94 out of 100 based on 84 user ratings 934 reviews