better command names
This commit is contained in:
12
README.md
12
README.md
@@ -10,7 +10,7 @@ Install with your plugin manager.
|
||||
Lazy.nvim
|
||||
```bash
|
||||
{
|
||||
"LucasMiguel/nvim-sync-ftp",
|
||||
url = "https://git.cems.dev/cdricms/nvim-sync-ftp",
|
||||
config = function ()
|
||||
require('nvim-sync-ftp').setup()
|
||||
end
|
||||
@@ -47,6 +47,12 @@ Create a file named `.sync-ftp-config` in the project root, or run the command `
|
||||
|
||||
## Commands
|
||||
|
||||
`:SyncFtpMapToRemote`: Create configuration file in root directory
|
||||
`:FtpInit`: Create configuration file in root directory
|
||||
|
||||
`:SyncFtpUpload`: Upload file from current open Buffer
|
||||
`:FtpPushFile`: Upload file from current open Buffer
|
||||
|
||||
`:FtpPush`: Upload directory from current open Buffer
|
||||
|
||||
## Original project
|
||||
|
||||
https://github.com/LucasMiguel/nvim-sync-ftp
|
||||
|
||||
@@ -5,7 +5,7 @@ local M = {}
|
||||
function M.setup(opts)
|
||||
local config = cli.getConfig()
|
||||
|
||||
vim.api.nvim_create_user_command("SyncFtpMapToRemote", function(params)
|
||||
vim.api.nvim_create_user_command("FtpInit", function(params)
|
||||
cli.MapToRemote(params)
|
||||
end, {
|
||||
force = true,
|
||||
@@ -13,7 +13,7 @@ function M.setup(opts)
|
||||
range = true,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_user_command("SyncFtpUpload", function(params)
|
||||
vim.api.nvim_create_user_command("FtpPushFile", function(params)
|
||||
cli.UploadFile()
|
||||
end, {
|
||||
force = true,
|
||||
@@ -21,7 +21,7 @@ function M.setup(opts)
|
||||
range = true,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_user_command("SyncFtpUploadDir", function(params)
|
||||
vim.api.nvim_create_user_command("FtpPush", function(params)
|
||||
cli.UploadDir()
|
||||
end, {
|
||||
force = true,
|
||||
@@ -32,10 +32,10 @@ function M.setup(opts)
|
||||
if next(config) ~= nil then
|
||||
-- Config for on save
|
||||
if config.upload_to_save == 'true' then
|
||||
vim.api.nvim_create_augroup("SyncFtpUploadGroup", { clear = true })
|
||||
vim.api.nvim_create_augroup("FtpPushGroup", { clear = true })
|
||||
|
||||
vim.api.nvim_create_autocmd("BufWritePost", {
|
||||
group = "SyncFtpUploadGroup",
|
||||
group = "FtpPushGroup",
|
||||
pattern = "*.*",
|
||||
callback = function(args)
|
||||
cli.Upload()
|
||||
|
||||
Reference in New Issue
Block a user