When using vim to run a shell command, eg. with

:!ls

or

:sh

to get into a shell, I always have the prompt

Press ENTER or type command to continue

This is fine for "internal" vim commands like :ls, for which the screen must pause to allow me to see the output, but when I want to run script eg. :!./% then I have to press enter after running it. Is there an option that will allow vim commands to pause but not shell commands?

link|improve this question
feedback

1 Answer

up vote 3 down vote accepted

Maybe this ?

:silent !ls
link|improve this answer
Note that you'll only see the output of any commands you run with :silent when you EXIT vim. – pbr Nov 25 '09 at 16:40
He didn't say anything about that -> he just doesn't want to press enter. – ldigas Nov 26 '09 at 19:46
:silent is documented in the help as the way to prevent the "Press ENTER" message. There should be a 'shortmess' flag for this, but none exists. – njd Feb 4 '10 at 15:36
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.