search

Home  >  Q&A  >  body text

Is it possible to make Vim do something like a pipe filter?

What I want to achieve is

ls | vim - | xargs /bin/rm  

ls runs and sends the content to vim, which can be edited at will. Finally, when exiting vim, it prints the formatted standard input to the output, so that the pipeline can continue.

Can this be achieved?

習慣沉默習慣沉默2784 days ago588

reply all(1)I'll reply

  • 天蓬老师

    天蓬老师2017-05-16 16:42:31

    vim -c ...
    But... I want to ask you why you don't use ed/sed/awk/perl?

    reply
    0
  • Cancelreply