Skip to content

perklet/vim-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

vim-sync

Sync files with remote machine in vim

Installation

Use your plugin manager of choice.

  • Pathogen
    • git clone https://github.com/yifeikong/vim-sync ~/.vim/bundle/vim-sync
  • Vundle
    • Add Bundle 'https://github.com/yifeikong/vim-sync' to .vimrc
    • Run :BundleInstall
  • NeoBundle
    • Add NeoBundle 'https://github.com/yifeikong/vim-sync' to .vimrc
    • Run :NeoBundleInstall
  • vim-plug
    • Add Plug 'https://github.com/yifeikong/vim-sync' to .vimrc
    • Run :PlugInstall

Usage

When you have a slow network, editing files on remote machine can be very annoying. With vim-sync, you can edit files on local machine and upload it right in vim.

Vim-sync uses rsync to sync between your local project files with remote ones. Suppose your remote repository is /opt/my-project, remote machine is john@example.com and your local repository is ~/repos/my-project.

  1. create a file named .vim-sync in project root on local machine, with remote address as content

    % cd ~/repos/my-project
    % echo 'john@example.com:/opt/my-project' > .vim-sync
    
  2. Edit some files and save them.

  3. Use :VSUploadFile to upload current file to remote, use :VSUpload to upload all files to remote.

Todo

  1. support asyncrun.
  2. better error handling
  3. add doc in vim

About

sync with remote machine in vim

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published