change jk mapping for visual mode only
This commit is contained in:
parent
d617bb5a75
commit
5db641289d
1 changed files with 2 additions and 2 deletions
|
@ -72,13 +72,13 @@ M.general = {
|
|||
t = { ["<C-x>"] = { termcodes "<C-\\><C-N>", "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 } },
|
||||
["<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 } },
|
||||
},
|
||||
|
||||
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<CR>:let @"=@0<CR>', opts = { silent = true } },
|
||||
|
|
Loading…
Reference in a new issue