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
|
Lazy.nvim
|
||||||
```bash
|
```bash
|
||||||
{
|
{
|
||||||
"LucasMiguel/nvim-sync-ftp",
|
url = "https://git.cems.dev/cdricms/nvim-sync-ftp",
|
||||||
config = function ()
|
config = function ()
|
||||||
require('nvim-sync-ftp').setup()
|
require('nvim-sync-ftp').setup()
|
||||||
end
|
end
|
||||||
@@ -47,6 +47,12 @@ Create a file named `.sync-ftp-config` in the project root, or run the command `
|
|||||||
|
|
||||||
## Commands
|
## 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)
|
function M.setup(opts)
|
||||||
local config = cli.getConfig()
|
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)
|
cli.MapToRemote(params)
|
||||||
end, {
|
end, {
|
||||||
force = true,
|
force = true,
|
||||||
@@ -13,7 +13,7 @@ function M.setup(opts)
|
|||||||
range = true,
|
range = true,
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.api.nvim_create_user_command("SyncFtpUpload", function(params)
|
vim.api.nvim_create_user_command("FtpPushFile", function(params)
|
||||||
cli.UploadFile()
|
cli.UploadFile()
|
||||||
end, {
|
end, {
|
||||||
force = true,
|
force = true,
|
||||||
@@ -21,7 +21,7 @@ function M.setup(opts)
|
|||||||
range = true,
|
range = true,
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.api.nvim_create_user_command("SyncFtpUploadDir", function(params)
|
vim.api.nvim_create_user_command("FtpPush", function(params)
|
||||||
cli.UploadDir()
|
cli.UploadDir()
|
||||||
end, {
|
end, {
|
||||||
force = true,
|
force = true,
|
||||||
@@ -32,10 +32,10 @@ function M.setup(opts)
|
|||||||
if next(config) ~= nil then
|
if next(config) ~= nil then
|
||||||
-- Config for on save
|
-- Config for on save
|
||||||
if config.upload_to_save == 'true' then
|
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", {
|
vim.api.nvim_create_autocmd("BufWritePost", {
|
||||||
group = "SyncFtpUploadGroup",
|
group = "FtpPushGroup",
|
||||||
pattern = "*.*",
|
pattern = "*.*",
|
||||||
callback = function(args)
|
callback = function(args)
|
||||||
cli.Upload()
|
cli.Upload()
|
||||||
|
|||||||
Reference in New Issue
Block a user