5 edited tags
| link
4 added 211 characters in body
source | link

[UPDATE]

exec '!ls -l' shellescape(expand('%')) can work, but stil i can't figure out how to make rsync above work. I have no idea where should i put quotes for this more complex command rsync.

[UPDATE]

exec '!ls -l' shellescape(expand('%')) can work, but stil i can't figure out how to make rsync above work. I have no idea where should i put quotes for this more complex command rsync.

3 added 120 characters in body
source | link

My ultimate goal is perform rsync by Ctrl+c, e.g:

nnoremap <C-c> :!eval `ssh-agent -s`; ssh-add; rsync -azvb --no-t % xiaobai@127.0.0.1:/tmphome/xiaobai/storage/

My platform is Kali LinuxLinux's vim.gtk3, bash. Fedora's vim and gvim also have the same problem.

What's the correct syntax to escape filename containing single and double quotes in vim ?

My ultimate goal is perform rsync by Ctrl+c:

nnoremap <C-c> :!rsync -azvb --no-t % xiaobai@127.0.0.1:/tmp/

My platform is Kali Linux bash.

What's the correct syntax to escape filename containing single and double quotes ?

My ultimate goal is perform rsync by Ctrl+c, e.g:

nnoremap <C-c> :!eval `ssh-agent -s`; ssh-add; rsync -azvb --no-t % xiaobai@127.0.0.1:/home/xiaobai/storage/

My platform is Kali Linux's vim.gtk3, bash. Fedora's vim and gvim also have the same problem.

What's the correct syntax to escape filename containing single and double quotes in vim ?

2 edited tags
| link
1
source | link