eshion / vim-sftp-sync Goto Github PK
View Code? Open in Web Editor NEWAutomatic asynchronous SFTP,FTP,... for buffers in vim
Automatic asynchronous SFTP,FTP,... for buffers in vim
Hi again! Now that the user and pass are optional, it would be really cool to have a "silent" option, where there's not so much output every time a file is saved. Perhaps it could integrate with https://github.com/bling/vim-airline, and Airline could just display a status message somewhere?
Thx very much
I'm trying to use sftp sync with my remote aws server.
I have my public key in .ssh dir, so my config is
let g:vim_sftp_configs = {
\ 'ticketk' : {
\ 'upload_on_save' : 1,
\ 'download_on_open' : 0,
\ 'confirm_downloads': 1,
\ 'confirm_uploads' : 0,
\ 'local_base_path' : '/Users/path/to/my/dir',
\ 'remote_base_path' : '/home/ubuntu/',
\ 'sftp_command' : 'sftp',
\ 'user' : 'myusername',
\ 'pass' : 'mypassword',
\ 'host' : '13.124.xxx.xx',
\ 'ssh_key_file': '~/path/to/my/pem_file.pem',
\ },
\}
Is it correct way to add 'ssh_key_file': '~/path/to/my/pem_file.pem',
to my config or anything else?
or I can't use pem key files in vim-sftp-sync?
Anyway, it's really convenient and great. thx
I use key authentication to connect to my servers and have no need for user or pass, but when I omit them from the config, I get this:
Error detected while processing function SftpAutoUpload..SftpUpload..<SNR>94_makeCmdStr:
line 41:
E716: Key not present in Dictionary: user
E15: Invalid expression: conf['user']
line 42:
E716: Key not present in Dictionary: pass
E15: Invalid expression: conf['pass']
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)
I have a index.php file, stored in the folder Test.
I put my SFTP settings in vimrc and in a config file in the Test folder of the editted file, called 'configs'.
The settings are:
let g:vim_sftp_configs = {
\ 'sample_server_1' : {
\ 'upload_on_save' : 1,
\ 'download_on_open' : 0,
\ 'confirm_downloads': 1,
\ 'confirm_uploads' : 0,
\ 'local_base_path' : '/Users/Rene Froger/Desktop/Test/',
\ 'remote_base_path' : '/httpdocs/',
\ 'sftp_command' : 'ftp',
\ 'user' : 'xxxxxxxx',
\ 'pass' : 'xxxxxxxx',
\ 'host' : 'xxxxx'
\ }
}
I use as command: :call SftpUpload()
Then I get the message "Remote config not found". What went wrong here?
Hi.
I used the settings, that i checked in filezilla, and i got an error.
"front-page.php" 145L, 5880C записано
:!expect -c "set timeout 5; spawn ftp ftp14.hostland.ru; while {1} { expect complete { send \"exit\r\"; exit; } -re \"sftp>\" { send \"put /home/serii/Sites/wp-fictional-univesity/front-page.php /h
ost1670806.hostland.pro/htdocs/wp-fictional-univesity/wp-content/themes/wp-fictional-univesity/front-page.php\r\"; } -re \"not found\" { send \"exit\r\"; } -re \"Login:\|Name.*:\" { send \"host1670
806_fictionaluniversity\r\"; } -re \"P|password:\" { send \"yZTfbcLE9k\r\"; } -re \"No such file or directory\" { send \"mkdir /host1670806.hostland.pro/htdocs/wp-fictional-univesity/wp-content/the
mes/wp-fictional-univesity\r put /home/serii/Sites/wp-fictional-univesity/front-page.php /host1670806.hostland.pro/htdocs/wp-fictional-univesity/wp-content/themes/wp-fictional-univesity/front-page.
php\r\"; } timeout {exit;} eof {exit;} }"
/bin/bash: expect: команда не найдена
Оболочка завершила работу 127
Нажмите ENTER или введите команду для продолжения
What can be a problem?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.