When I run the following command ex:
:! some_command
It's somewhat annoying the message:
Press ENTER or type command to continue
Is there a way to automatically return to current buffer without press ENTER?
When I run the following command ex:
:! some_command
It's somewhat annoying the message:
Press ENTER or type command to continue
Is there a way to automatically return to current buffer without press ENTER?
A way to do this is to use the silent command:
:silent !ls
This will return to normal mode right after the command (here ls has been executed).
In the case the command produces output, you may want to force a redraw of the screen with the redraw command:
:execute "silent !ls" | redraw!
You can even create a new command that does this for you:
command! -nargs=+ Silent execute 'silent <args>' | redraw!
And use it like so:
:Silent !ls
:help press-enter– romainl May 21 '16 at 16:18