Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Maybe this ?

:silent !ls
share|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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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