vim ftp auto upload
I am learning VIM. I have a local project, and I want to keep it synchronized on FTP server. So I need:
- turning automated sync on, when i edit files localy
- turning it off
- forcing to uploading one file (useful when auto开发者_StackOverflowmatic sync off)
- forcing to download one file
- way to compare local and FTP version of a file
I use those features all the time with PHPStorm IDE, and now I wonder is it possible at all in VIM. I was thinking... maybe to use external rsync app or svn, and sync svn with ftp. Is that more like the way to go?
You can install this plugin which allow you to open a remote file with
:e ftp:www.foobax.com/myfile.txt
and save it locally
:w myfile.txt
(use w! to overwrite it)
You could diff it using the diffsplit
command. Example (on the window containing the remote file)
:diffsplit myfile.txt
Obviously, if you can use a VCS, that's even better.
精彩评论