Skip to content

A lightweight Neovim plugin to sync files across hosts using Rsync.

License

Notifications You must be signed in to change notification settings

bradenhelmer/nvim-syncer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

nvim-syncer

This plugin leverages rsync to provide automatic syncing of host and remote directories.

WARNING: This software is very new and is prone to bugs, feel free to open an issue if you have found one.

Usage

Dependencies

  • rsync
  • ssh

Installation

Use any whatever plugin manager you would like.

Setup

Example lua configuration setup:

local syncer = require("nvim-syncer")
vim.keymap.set('n', "<leader>sd", ":SyncDown<CR>")
vim.keymap.set('n', "<leader>su", ":SyncUp<CR>")

In the directory you are syncing, create a sync.lua file with the following template:

local sync_config = {
        -- Address of remote machine.
        remote_ip = "",
        -- Username on remote machine, required if remote_ip specified.
        username = "",
        -- Destination syncing path, better if absolute path.
        dest_path = "",
        -- Option to automatically sync on save. False by defualt
        on_save = true
        -- List of files to be excluded. sync.lua is excluded by default!
        excludes = {}
        -- List of files to read excludes from e.g .gitgnore.
        exclude_files = {}
}
return sync_config

If sync.lua is edited, neovim must be reloaded.

About

A lightweight Neovim plugin to sync files across hosts using Rsync.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages