开发者

vim ftp auto upload

开发者 https://www.devze.com 2023-04-08 10:42 出处:网络
I am learning VIM. I have a local project, and I want to keep it synchronized on FTP server. So I need:

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号