add visual mode keymaps to yank/put into register 'a'

allow storing text into a named register so that it won't be lost when replacing selected text
This commit is contained in:
jc 2023-10-01 19:20:04 -04:00
commit ad672effd4
No known key found for this signature in database

View file

@ -48,9 +48,10 @@ vim.keymap.set("x", "d", "\"_d")
-- copy/paste to/from system clipboard
vim.keymap.set({ "n", "v" }, "<leader>y", "\"+y")
-- pasting a selected/higlighted block of text should not replaced the content of the clipboard with it
vim.keymap.set({ "n", "v" }, "<leader>p", "_\"+p")
vim.keymap.set({ "n", "v" }, "p", "_p")
vim.keymap.set("n", "<leader>p", "\"+p")
-- yank/put to/from register 'a'
vim.keymap.set("x", "ay", '"ay', { noremap = true })
vim.keymap.set("x", "ap", '"ap', { noremap = true })
-- increment/decrement a count, helpful for changing indeces
vim.keymap.set("n", "+", "<C-a>")