eshion / vim-sftp-sync

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

Remote config not found #3

Open ReneFroger opened 10 years ago

ReneFroger commented 10 years ago

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?

eshion commented 10 years ago

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' \ } }

ReneFroger commented 10 years ago

Thanks for your reply, I forgot the backslash on the last line here, but in my setup the backslash is set. I still get the message.

What went wrong? And where do I put the configure file?

eshion commented 10 years ago

just write it to vimrc file, no other config file require.

ReneFroger commented 10 years ago

It was already set in my vimrc. :)

In my _vimrc (note, I'm using Gvim), I use the following config:

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' : 'xxxx', \ 'pass' : 'xxxx', \ 'host' : 'server5.hosting2go.nl' \ } }

When I type the command :call SftpUpload(), I still get the message: "Remote config not found". How the heck went wrong here?

eshion commented 10 years ago

this maybe cause by local_base_path, pls try setting another path.

v0d1ch commented 8 years ago

Hi did you solve this?

ReneFroger commented 8 years ago

Switched to Emacs. I suggest you do the same, the Vim inside Spacemacs is even better. In Emacs you can everything there as you do in Vim with Evil. Everything. Vim modal editing, Vim commands like :%s/foo/bar/g :e foobar.txt, :cd :vsplit or another ex commands, and even import your Vimrc, if you need a marco. Emacs even interprets Vimscripts, if you want to write a marco for it. But now you have a full blown development environment, complete keyboard driven operation system without any fuss or GUI. There are packages in Emacs that have no Vim equivalence. Some of them are listed on http://emacs.zeef.com

You can read this comment written by a Vim convert. This one is even better.

There is a preconfigured Emacs package with Vim included. You can test it for yourself. But you can also set up Emacs with Evil yourself..

Interactive REPL stuffs? Vim still has to go a long way. Even Neovim is not able to do this or this. And much more, see a awesome list here..

You can also check this video: how I use Vim with Emacs.

Summary

To put it simply. Emacs is capable of more. There are many things that Emacs can do that Vim simply cannot. This is because Emacs can display images, process tasks asynchronously in the background, and be truly extended, By this I mean that all of Emacs’ core functionality is exposed through elisp functions, which can be called and even overridden using a sort of mixin strategy called “advice.” Given this, there are few limitations to what you can do to customize it. Vim provides a scripting language that can manipulate most of Vim’s behavior, but it is limited primarily to modifying data; you cannot change any fundamental behaviors like how Vim draws line numbers. And it's all free and opensource.

v0d1ch commented 8 years ago

Ah don't know if I am ready to do that just now. Ill probably give it a go once I find more spare time to get into it. Thanks for all those infos on emacs!

ReneFroger commented 8 years ago

Try Spacemacs to figure out already if it's something for you.

zhaogaolong commented 7 years ago

I use windows gvim myconfig: `

let g:vim_sftp_configs = { \ 'centos7_dev' : { \ 'upload_on_save' : 1, \ 'download_on_open' : 1, \ 'confirm_downloads': 0, \ 'confirm_uploads' : 0, \ 'local_base_path' : 'H:\TestPorject\', \ 'remote_base_path' : '/root/tmp/sync/', \ 'sftp_command' : 'sftp', \ 'complete_prompt_regexp' : '100\%', \ 'user' : 'xxx', \ 'pass' : 'xxx', \ 'host' : 'xxx.xxx.xxx.xxx' \ } }

nnoremap :call SftpUpload() nnoremap :call SftpDownload()<CR `

I use as command: :call SftpUpload() Then I get the message "Remote config not found". What went wrong here?

hmohdarafat commented 2 months ago

Where do we put the config file? I get the error "Remote config not found" even if I place the config in the _vimrc file. I use Windows.