A Neovim plugin for copying current file path.
With lazy.nvim
{
"ohakutsu/socks-copypath.nvim",
config = function()
require("socks-copypath").setup()
end,
},
With packer.nvim
use({
"ohakutsu/socks-copypath.nvim",
config = function()
require('socks-copypath').setup()
end
})
First, you need to call setup()
function.
require("ohakutsu/socks-copypath.nvim").setup()
Following are the default configuration.
{
register = "+", -- Name of the register to set file path
}
When you call the setup()
function, the following commands are defined.
CopyPath
- Copy full path of current file
CopyRelativePath
- Copy relative path of current file
CopyFileName
- Copy name of current file without extension