eshion / vim-sftp-sync

Automatic asynchronous SFTP,FTP,... for buffers in vim
40 stars 14 forks source link

Can not stop uploading once I triggered SftpUpload() #7

Closed fukutomy closed 5 years ago

fukutomy commented 5 years ago

First of all, Thanks for this awesome plugin.

When I configured as below and once I saved some file in local_base_path, SftpUpload() successfully triggered. But once It occurred, it is executed repeatedly and I can not stop without Ctl+C.

let g:vim_sftp_configs = {
  \ 'dev' : {
  \   'upload_on_save'   : 1,
  \   'download_on_open' : 0,
  \   'confirm_downloads': 1,
  \   'confirm_uploads'  : 0,
  \   'local_base_path'  : '/Users/path/,
  \   'remote_base_path' : '/home/path',
  \   'sftp_command' : 'sftp',
  \   'host' : '-P 22 -i ~/.ssh/*.pem user@host'
  \ },
  \}

Do you guys have any ideas ?

Best,

e.g. I can see logs like this.

spawn sftp -P 22 -i ~/.ssh/*.pem user@host
Connected to user@host
sftp> put local_file A remote_file B
Uploading local_file A to /remote_file B
sftp> put local_file A remote_file B
Uploading local_file A to /remote_file B
sftp> put local_file A remote_file B
Uploading local_file A to /remote_file B
.....
.....
(endless)
fukutomy commented 5 years ago

https://github.com/eshion/vim-sftp-sync/blob/master/plugin/sftp-sync.vim#L66

Maybe, should I add "send exit" here ?

dipcwd commented 5 years ago

how did you solved this?