better command names
This commit is contained in:
@@ -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