Update .config/nvim/init.lua

This commit is contained in:
Lewis Wynne 2025-11-02 03:29:32 +00:00
parent 83b21030b6
commit c9f30ab420

View file

@ -42,3 +42,15 @@ vim.o.iskeyword = '@,48-57,_,192-255,-'
vim.o.tabstop = 2 vim.o.tabstop = 2
vim.o.shiftwidth = 2 vim.o.shiftwidth = 2
-- Keymaps
local nmap = function(lhs, rhs, desc)
vim.keymap.set('n', lhs, rhs, { desc = desc })
end
local nmap_leader = function(lhs, rhs, desc)
vim.keymap.set('n', '<Leader>' .. lhs, rhs, { desc = desc })
end
nmap('[p', '<Cmd>exe "put! " . v:register<CR>', 'Paste above')
nmap(']p', '<Cmd>exe "put " . v:register<Cr>', 'Paste below')
nmap_leader('ei', '<Cmd>edit $MYVIMRC<CR>', 'init.lua')