✨ feat(nvim): add new keymaps for not yank when changing
This commit is contained in:
parent
06398683de
commit
4fd723b637
2 changed files with 7 additions and 3 deletions
|
@ -66,9 +66,12 @@ map("n", "<C-c>", ":%y+<CR>", { desc = "Copy whole text to clipboard", silent =
|
|||
-- Select all text
|
||||
map("n", "<C-a>", "gg<S-V>G", { desc = "Select all text", silent = true, noremap = true })
|
||||
|
||||
-- Better paste
|
||||
-- remap "p" in visual mode to delete the highlighted text without overwriting your yanked/copied text, and then paste the content from the unnamed register.
|
||||
map("v", "p", '"_dP')
|
||||
map("v", "p", '"_dP', { desc = "Paste without overwriting" })
|
||||
|
||||
map("n", "c", '"_c', { desc = "Change without yanking" })
|
||||
map("n", "C", '"_C', { desc = "Change without yanking" })
|
||||
map("x", "c", '"_c', { desc = "Change without yanking" })
|
||||
map("x", "C", '"_C', { desc = "Change without yanking" })
|
||||
|
||||
map("n", "dd", function()
|
||||
local is_empty_line = vim.api.nvim_get_current_line():match("^%s*$")
|
||||
|
|
|
@ -6,5 +6,6 @@ return {
|
|||
extra_keymaps = true,
|
||||
extended_keymaps = true,
|
||||
override_keymaps = true,
|
||||
default_delay = 3,
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue