From 5db641289d9594b7b278f5bd4b169031ad4d73d8 Mon Sep 17 00:00:00 2001 From: Lucario387 Date: Thu, 8 Sep 2022 19:55:15 +0900 Subject: [PATCH] change jk mapping for visual mode only --- lua/core/mappings.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 084bac8..0abf7fd 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -72,13 +72,13 @@ M.general = { t = { [""] = { termcodes "", "escape terminal mode" } }, v = { - ["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } }, - ["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 = { + ["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } }, + ["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } }, -- 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 } },