An open API service indexing awesome lists of open source software.

https://github.com/oprogramador/vim-ftp

vim plugin for synchronization via FTP
https://github.com/oprogramador/vim-ftp

Last synced: 5 months ago
JSON representation

vim plugin for synchronization via FTP

Awesome Lists containing this project

README

          

# vim-ftp

This plugin enables downloading and uploading files via FTP using vim editor.

## Installation:
- Make sure, you have [realpath](https://man7.org/linux/man-pages/man3/realpath.3.html) installed.
- Use [pathogen](https://github.com/tpope/vim-pathogen) or [vundle](https://github.com/VundleVim/Vundle.vim).
- Run `scripts/startup.sh`.

## Configuration

Write your FTP settings in the `.vimrc` file like the following:
```vim
let g:ftp_conf = {
\ 'local_base_path' : '/home/name/sample/',
\ 'local_backup_path' : '/home/name/undo/',
\ 'remote_base_path' : '/var/www/sample/',
\ 'user' : 'username',
\ 'pass' : 'password',
\ 'host' : '127.0.0.1',
\ 'silent' : 0
\ }
```

## Usage

- `:call Download()` - download current file
- `:call Upload()` - upload current file
- `:call DownloadAny('file.txt')` - download any file
- `:call UploadAny('file.txt')` - upload any file
- `:call DownloadAllBuffers()` - download files in all opened buffers
- `:call UploadAllBuffers()` - upload files in all opened buffers
- `:call DownloadAllTabs()` - download files in all opened tabs
- `:call UploadAllTabs()` - upload files in all opened tabs
- `Tab` - open new file with backup
- `Close` - close current tab with backup
- `CloseAll` - close all opened tabs with backup