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.

I've seen lots of ways to redirect input from stdin to VI, but I'd like to redirect VI to save to a pipe rather than a file. For example, I'd like to pipe VI's entire pipe buffer to another text editing program, such as kate. Is this possible?

share|improve this question
add comment

1 Answer

I'm not sure about plain vi. But in Vim, you can write a buffer (or portions of a buffer) to an arbitrary external command via stdin, like :w !my_external_command

The help does not mention this being a Vim-specific command, so it may also be available in vi. If you're actually using Vim after all and not just vi, then see :help :w_c for details.

share|improve this answer
add comment

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.