0

I know how to run shell comands in vim with :! bang syntax, But how can I done it after vim commands? for example :w!; !echo "some stuff"? I cannot make semicolon and continue with bang. So is there a possibility do mix vim/shell commands, or the only way to do it is separately?

1

Use a pipe character:

:w|!echo "some stuff"

You can find more about it in :help :bar.

| improve this answer | |
  • Why the |. Vim documentation :help |says only about pipe as screen column motion, but no use in ex mode – Herdsman Apr 27 at 11:45
  • @Herdsman Yeah, but see edit. – Quasímodo Apr 27 at 11:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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