Pipe Vim buffer to stdout

后端 未结 5 876
执念已碎
执念已碎 2021-02-07 02:37

I\'d like to use Vim in the middle of a pipe. This existing post looks like what I\'d like to do, except I was hoping to do it without Python\'s help -- only with bash. [It it

5条回答
  •  Happy的楠姐
    2021-02-07 02:51

    > ls -1 fred*.c | vim -
    

    will result in Vim opening an unnamed file containing a list of files fred*

    Perhaps I misunderstood your question though...

    Alternative interpretation:

    See this page which describes a technique to

    Without saving the current buffer you want to send its contents to an interpreter (python, scheme, whatever), and you want that interpreter to run in a freshly spawned xterm. A new xterm window is useful because running the shell within Vim does not allow simultaneously inspection of program output and the code buffer, and Vim's shell is weak in several respects.

提交回复
热议问题