How to write buffer content to stdout?

后端 未结 9 1737
执笔经年
执笔经年 2020-12-09 01:54

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

9条回答
  •  暖寄归人
    2020-12-09 02:35

    You can also use pipe.vim. It does use a temporary file, but at least you don't have to worry about it in your own script.

    To the second part of your question, you use the -s command line option with vim to remap :w to something else (like :w !tee).

提交回复
热议问题