This is for all the Rubyists out there who can really rock the Vim.
How do you invoke a shell command and pass arguments to said command?
function Put(computer)
!rsync -v -rulptzCF string(getcwd()) . “/” string(a:computer) . “:”
. string(getcwd()) . “/”
endfunction
The idea here is that I want a Put function that takes a computer name
as an argument. This function will use rsync to copy all modified
files from the current working directory to the same directory on the
remote computer.
The reason for this is that I’m developing on Windows but my code
needs to run on Linux and Solaris. Pushing code to the machines where
autotest will run it is the desired outcome. I don’t want to have to
drop out of vim and into a shell prompt each time I do this.
The function I gave above is total crap, but hopefully it conveys the
idea I want to accomplish. Any help or thoughts? A simple example,
maybe?
TwP