An rsync wrapper for Neovim fully written in Lua. This is currently a WIP, more features should eventually make their way into this plugin.
Dependencies:
Using Lazy:
{
"michel-garcia/rsync.nvim",
config = function ()
require("rsync").setup({
sync_up_on_write = false
})
end
}
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.
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.