From baba79c8b11760736a51a0b17b20e3c02eebe61b Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Wed, 28 Feb 2024 08:03:26 +0100 Subject: [PATCH] paste/delete without yank --- lua/keymaps.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/keymaps.lua b/lua/keymaps.lua index 9700d3b..e4fef89 100644 --- a/lua/keymaps.lua +++ b/lua/keymaps.lua @@ -29,6 +29,12 @@ vim.keymap.set('n', '', '', { desc = 'Move focus to the right win vim.keymap.set('n', '', '', { desc = 'Move focus to the lower window' }) vim.keymap.set('n', '', '', { desc = 'Move focus to the upper window' }) +-- Delete (currently selected) text without yanking it +vim.keymap.set({ 'n', 'v' }, 'dny', '"_d', { desc = '[D]elete [N]o [Y]ank' }) + +-- Replace currently selected text with default register without yanking it +vim.keymap.set('v', 'pny', '"_dP', { desc = '[P]aste [N]o [Y]ank' }) + -- Highlight when yanking (copying) text -- Try it with `yap` in normal mode -- See `:help vim.highlight.on_yank()`