Skip to content

michel-garcia/rsync.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 

Repository files navigation

Rsync for Neovim

An rsync wrapper for Neovim fully written in Lua. This is currently a WIP, more features should eventually make their way into this plugin.

Installation

Dependencies:

Using Lazy:

{
    "michel-garcia/rsync.nvim",
    config = function ()
        require("rsync").setup({
            sync_up_on_write = false
        })
    end
}

Usage

Create a file .rsync.lua in the root directory of your project:

return {
    host = "example.com", -- required
    port = 2222,
    user = "admin", -- required
    pass = "thereisnocowlevel",
    path = "/home/admin/public_html", -- required
    exclude = {
        ".htaccess",
        "uploads/"
    }
}

This config file (.rsync.lua) will not be uploaded/downloaded as it is automatically added to the exclusion list.

Commands

Command Description
SyncDown [current?] [delete?] Downloads remote files/dirs
SyncUp [current?] [delete?] Uploads local files/dirs
SyncStop Stops all active jobs (if any)

Both SyncDown and SyncUp accept delete as an optional argument which maps to --delete when executing rsync. Use with caution as this could potentially result in data loss. Refer to the manpages for rsync for more information.

Similarly, passing current to either SyncDown or SyncUp will make the command sync the file in the current buffer only.

About

An rsync wrapper for Neovim fully written in Lua

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages