Thanks for the replies, but that was not exactly what I meant. The
example was just an example. Another example would be:
    vim | mail -s “subject” [email protected]
I'm more interested in the general case. Piping is something very
common in unix, and I wondered if vim supported it fully.

Kind regards, Roald

On Jul 22, 4:10 am, Tony Mechelynck <[email protected]>
wrote:
> On 21/07/09 22:31, Roald wrote:
>
>
>
> > I meant
> >      vim | sed 's/foo/bar/'>  out.txt
>
> Let's push it one step further. Rather than
>
>      someprogram | vim | sed 's/foo/bar' > out.txt
>
> I'd use
>
>      someprogram > out.txt
>      vim -es -c '%s/foo/bar/g' -cq out.txt
>
> (using Vim in batch mode). Well, I /think/ stat's what that sed command
> does but I know Vim better than sed so I'm not sure. I guess I use Vim
> where most people use sed, because I know how to use it, and like its
> docs better.
>
> See
>         :help -e
>         :help -s-ex
>         :help -c
>         :help :s
>         :help :saveas
>         :help :q
>         :help -file
>
> For giving additional commands to Vim, see also
>         :help -S
>
> Best regards,
> Tony.
> --
> Life is a whim of several billion cells to be you for a while.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to