From d617bb5a752b51ed9b32677db8802cbdbe57436a Mon Sep 17 00:00:00 2001 From: Lucario387 Date: Thu, 8 Sep 2022 19:45:35 +0900 Subject: [PATCH] fix pasting in select mode --- lua/core/mappings.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index f5e7b60..084bac8 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -76,6 +76,9 @@ M.general = { ["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } }, [""] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } }, [""] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } }, + }, + + x = { -- Don't copy the replaced text after pasting in visual mode -- https://vim.fandom.com/wiki/Replace_a_word_with_yanked_text#Alternative_mapping_for_paste ["p"] = { 'p:let @+=@0:let @"=@0', opts = { silent = true } },