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