Currenly, this command only can execute at MacOSX environment and only one file can transfer.
osascript cp-text.scpt /path/from/file.py /path/to/file.py
On remote server, append these commands into .vimrc.
# ~/.vimrc
command CCP :redir! >> /tmp/copy_base64 | sil echon @* | redir end
On remote server, append these commands into .bashrc
# ~/.bashrc
function before_copy {
rm -f /tmp/copy_base64
}
function after_copy {
file=$1
md5=$2
mkdir -p $(dirname $file)
cat /tmp/copy_base64 | base64 -d > $file
diff <(md5sum $file | cut -d ' ' -f 1) <(echo $md5)
}
alias BCP="before_copy"
alias CCP="vimx +CCP +qall"
alias ACP="after_copy"
Reload Bash
bash
osascript cp.scpt /path/from/file.py /path/to/file.py