From: Tim Pease Date: 2006-08-22T00:21:41+09:00 Subject: Re: [OT] Vim Question On 8/20/06, ara.t.howard@noaa.gov wrote: > here i type > > :r !echo arg1 arg2 > > which says > > read in the output of 'echo arg1 arg2' > > yielding > > arg1 arg2 > > into my file. if you don't want output you can do things like > Okay, the solution I came up with is to build up the command inside one of the paste registers (@) and then execute that register. Here is a simple example that will move to the current working directory and do a file listing. function FuncGetls( ) let @g="!cd " . getcwd() . "; ls" @g endfunction command Getls call FuncGetls( ) My full solution for doing the rsync is this ... command -nargs=1 Put call Put("") function Put(puter) let s:dir=escape(getcwd(), "\"") . "/" let @r="!rsync -v -rulptzCF " . s:dir . " " . a:puter . ":" . s:dir @r endfunction Now I can send all the files I've modified to another computer by typing the following command ... :Put panic where panic is the name of the machine. TwP