feat: add <leader>d to duplicate line

This custom duplicate line mapping keeps the cursor in the same column.
(Which is useful when duplicating lines and modifying them at the same
time)
This commit is contained in:
Simon Lasbrugnas 2024-10-01 01:11:03 +02:00
parent 81b7e9f929
commit b47494563d
Signed by untrusted user who does not match committer: simon
GPG key ID: 86039876BA6ED8DE

View file

@ -31,6 +31,8 @@ vim.keymap.set("n", "<Down>", "<C-w>j")
vim.keymap.set("n", "<Up>", "<C-w>k")
vim.keymap.set("n", "<Right>", "<C-w>l")
-- Duplicate line
vim.keymap.set("n", "<leader>d", "mzyyp`zj")
-- Open a new terminal pane
vim.keymap.set("n", "<leader>t", "<cmd>botright terminal<CR>")