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 I use :! to execute a shell command, I always get the following prompt text from Vim. "Press ENTER or type command to continue"

enter image description here

I just want to remove the prompt, since I use this command frequently, I don't want to press the enter key every time. Is this possible?

share|improve this question

migrated from stackoverflow.com Nov 2 '12 at 10:03

This question came from our site for professional and enthusiast programmers.

1  
In this example, you will not see any ls output. –  sputnick Nov 2 '12 at 3:04
    
thanks, how to make it works for other example? –  zdd Nov 2 '12 at 3:10

1 Answer 1

up vote 2 down vote accepted

You can use

:silent !ls

But, if the command produces any output it will leave the screen in an inconsistent state. In that case you'd need to use Ctrl+L or :redraw to fix that.

Run :help :! from within vim for more information.

share|improve this answer

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.