On 2009-09-17, Christian Brabandt wrote:
> On Do, 17 Sep 2009, Tim Chase wrote:
> > You can pipe shell commands through "sh", so you can highlight
> > the range of commands and then just use
> >
> > :'<,'>!sh
>
> This deletes the command, which may or may not be desirable.
If you don't want to delete the command (or commands) and you don't
want to capture its output in the buffer, you can write the line(s)
to sh instead:
:'<,'>w !sh
And of course, you don't have to type the "'<,'>" part since that
appears automatically when you type : in visual mode.
I use this a lot when I'm developing scripts or just writing a
long, one-shot pipeline. Then I just write the whole buffer:
:w !sh
Regards,
Gary
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---