new structure
This commit is contained in:
72 files changed
+2659
-2947
No files matched your search
+22
-6
@@ -10,22 +10,38 @@ vim.api.nvim_create_user_command('ReloadConfig', function()
|
||||
vim.notify('Nvim configuration reloaded!', vim.log.levels.INFO)
|
||||
end, {})
|
||||
|
||||
local function copy_to_clipboard(content, message)
|
||||
vim.fn.setreg('+', content)
|
||||
vim.notify('Copied "' .. content .. '" to the clipboard!', vim.log.levels.INFO)
|
||||
end
|
||||
|
||||
vim.api.nvim_create_user_command('CopyRelativePath', function()
|
||||
local path = vim.fn.expand('%')
|
||||
vim.fn.setreg('+', path)
|
||||
vim.notify('Copied "' .. path .. '" to the clipboard!')
|
||||
copy_to_clipboard(path, 'Copied "' .. path .. '" to the clipboard!')
|
||||
end, {})
|
||||
|
||||
vim.api.nvim_create_user_command('CopyAbsolutePath', function()
|
||||
local path = vim.fn.expand('%:p')
|
||||
vim.fn.setreg('+', path)
|
||||
vim.notify('Copied "' .. path .. '" to the clipboard!')
|
||||
copy_to_clipboard(path, 'Copied "' .. path .. '" to the clipboard!')
|
||||
end, {})
|
||||
|
||||
vim.api.nvim_create_user_command('CopyRelativePathWithLine', function()
|
||||
local path = vim.fn.expand('%')
|
||||
local line = vim.fn.line('.')
|
||||
local result = path .. ':' .. line
|
||||
copy_to_clipboard(result, 'Copied "' .. result .. '" to the clipboard!')
|
||||
end, {})
|
||||
|
||||
vim.api.nvim_create_user_command('CopyAbsolutePathWithLine', function()
|
||||
local path = vim.fn.expand('%:p')
|
||||
local line = vim.fn.line('.')
|
||||
local result = path .. ':' .. line
|
||||
copy_to_clipboard(result, 'Copied "' .. result .. '" to the clipboard!')
|
||||
end, {})
|
||||
|
||||
vim.api.nvim_create_user_command('CopyFileName', function()
|
||||
local path = vim.fn.expand('%:t')
|
||||
vim.fn.setreg('+', path)
|
||||
vim.notify('Copied "' .. path .. '" to the clipboard!')
|
||||
copy_to_clipboard(path, 'Copied "' .. path .. '" to the clipboard!')
|
||||
end, {})
|
||||
|
||||
-- Switch to git root or file parent dir
|
||||
|
||||
Reference in new issue
Block a user