How to write buffer content to stdout?

hooblei picture hooblei · Jul 10, 2010 · Viewed 17.5k times · Source

Is there any chance to write the content of the current vim buffer to stdout?

I'd like to use vim to edit content that was passed via stdin - without the need of a temporary file to retrieve the modified content (on Linux/Unix).

Is it possible that a plugin/script - that act on quit or save put the buffer content to stdout?

Answer

weynhamz picture weynhamz · Aug 17, 2012

I think :w !tee would work perfectly,