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
You can use the ex-mode (p)rint command to print any set of lines you want to stdout.
print all lines:
:1,$p
Also prints all lines (% is a shorthand for the range 1,$)
:%p
print lines 4-10:
:4,10p
print next line containing FOO
/FOO/ p
print all lines containing FOO
g/FOO/ p