This commit is contained in:
sankalp committed 2024-06-04 14:15:38 +05:45
1 parent f255606a4c
commit 1403e0b215
14 files changed
+354 -183

No files matched your search

+8 -2
View File
@@ -11,19 +11,25 @@ vim.api.nvim_create_user_command('ReloadConfig', function()
end, {})
-- Copy relative path
vim.api.nvim_create_user_command('CRpath', function()
vim.api.nvim_create_user_command('CopyRelativePath', function()
local path = vim.fn.expand('%')
vim.fn.setreg('+', path)
vim.notify('Copied "' .. path .. '" to the clipboard!')
end, {})
-- Copy absolute path
vim.api.nvim_create_user_command('CApath', function()
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!')
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!')
end, {})
-- Switch to git root or file parent dir
vim.api.nvim_create_user_command('RootDir', function()
local root = require('lib.util').get_root_dir()
+1 -1
View File
@@ -206,7 +206,7 @@ map('i', '<M-c>', function() return vim.fn['codeium#Clear']() end, { expr = true
-- Oil Explorer
map('n', '<leader>e', function()
map('n', '<leader>E', function()
require("oil").toggle_float()
end, { desc = icons.documents.OpenFolder .. 'Oil File Explorer' })