ftpsync : Synchronize files with a remote server
| script karma
Downloaded by 2097
Comments, bugs, improvements
script versions (upload new version)
|The FtpUpdate script provides you the ability to synchronize your files with a server. The main idea when I created this script was to use GVim to edit the files on my local PC, which one has SVN or GIT, rather than directly on the remote server in a shared directory (similar to the staging concept in GIT).
With S-F7, you can define the server and the remote path used. The settings can be set for the buffer only or globally if you have many files to synchronize from/to the same directory. You can set both, and then buffer settings will preempt global settings.
- <S-F5> and <S-F6>: allow you to update your file respectively from and to the server. Asks for the synchronization parameters if needed.
- <S-F7>: set the synchronization parameters.
- <S-F8>: display the synchronization parameters of the current buffer.
- FtpGetParam(): display the synchronization parameters of the current buffer.
- FtpSetParam(...): set the synchronization parameters
- FtpSetServer(...): set the server parameter
- FtpSetPath(...): set the path parameter
- FtpUpdate(): put the buffer to the remote server
- FtpRefresh(): get the file from the remote server
Note that you can set both global parameters and buffer parameters for a specific buffer which needs different parameters. The buffer settings are taken into account before the global ones.
Further more, through the FtpSetPath or FtpSetServer functions, you can set only a specific path or server for a buffer, the second parameter (path or server) being taken from the global variable.
With <S-F7> you set global parameters srv1 and path /home/user1. Then for a specific buffer you type :call FtpSetPath() and set /home/dummy2 as buffer path (or type :call FtpSetPath("/home/user2","b")).
Then using <S-F5> or <S-F6> on this buffer will use ftp://srv1/home/user2 and ftp://srv1/home/user1 for the other ones.
The protocol used is FTP. Writing and reading are performed through netrw.vim plugin, i.e. as typing
Note that <proto> is set in g:FtpSync_Proto (scp by default).
|Copy the ftpsync.vim file into your $VIM/vimfiles/plugin directory and restart VIM|
Click on the package to download.
ip used for rating: 188.8.131.52