mirror of
https://github.com/dcarrillo/dotfiles.git
synced 2025-09-19 22:39:08 +00:00
20 lines
601 B
Lua
20 lines
601 B
Lua
vim.api.nvim_create_user_command("CopyBufferPath", function()
|
|
local path = vim.fn.expand("%:p")
|
|
vim.fn.setreg("+", path)
|
|
vim.notify('Copied "' .. path .. '" to the clipboard!')
|
|
end, {})
|
|
|
|
vim.api.nvim_create_user_command("CopyDirectoryPath", function()
|
|
local path = vim.fn.expand("%:p:h")
|
|
vim.fn.setreg("+", path)
|
|
vim.notify('Copied "' .. path .. '" to the clipboard!')
|
|
end, {})
|
|
|
|
vim.api.nvim_create_user_command("RemoveTrailingSpaces", function()
|
|
vim.cmd("% s/\\s\\+$//e")
|
|
end, {})
|
|
|
|
vim.api.nvim_create_user_command("SetSchema", function()
|
|
require("schema-companion").select_schema()
|
|
end, {})
|