Massive changes!!
This commit is contained in:
15
lua/helpers.lua
Normal file
15
lua/helpers.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
local helpers = {}
|
||||
|
||||
--- Creates a keymap to edit a certain config file
|
||||
--- @param map string the keys that follow <Leader>e
|
||||
--- @param path string the relative path from the config root
|
||||
helpers.edit_cf = function(map, path)
|
||||
vim.keymap.set('n', '<Leader>e' .. map, function()
|
||||
vim.cmd('tabedit ' .. vim.fn.stdpath 'config' .. '/' .. path)
|
||||
end, { desc = 'Edit ' .. path .. ' in a new tab' })
|
||||
end
|
||||
|
||||
helpers.edit_cf('h', '/lua/helpers.lua')
|
||||
|
||||
return helpers
|
||||
-- nnoremap <Leader>ev :tabedit $MYVIMRC<CR>
|
||||
Reference in New Issue
Block a user