fix pasting in select mode

This commit is contained in:
Lucario387 2022-09-08 19:45:35 +09:00 committed by Sidhanth Rathod
parent b34328fb41
commit d617bb5a75

View file

@ -76,6 +76,9 @@ M.general = {
["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } }, ["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } },
["<Up>"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } }, ["<Up>"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } },
["<Down>"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } }, ["<Down>"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } },
},
x = {
-- Don't copy the replaced text after pasting in visual mode -- 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 -- https://vim.fandom.com/wiki/Replace_a_word_with_yanked_text#Alternative_mapping_for_paste
["p"] = { 'p:let @+=@0<CR>:let @"=@0<CR>', opts = { silent = true } }, ["p"] = { 'p:let @+=@0<CR>:let @"=@0<CR>', opts = { silent = true } },