From 229ad7e00d19d4c3e38bc6d3c281bb5e6ed2e706 Mon Sep 17 00:00:00 2001 From: i3cheese Date: Sat, 19 Mar 2022 12:32:34 +0700 Subject: [PATCH] Fix j -> gj mapping. --- 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 8cce437..1c61892 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -32,8 +32,8 @@ M.misc = function() -- http://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/ -- empty mode is same as using :map -- also don't use g[j|k] when in operator pending mode, so it doesn't alter d, y or c behaviour - map_wrapper("", "j", 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', { expr = true }) - map_wrapper("", "k", 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', { expr = true }) + map_wrapper({"n", "x", "o"}, "j", 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', { expr = true }) + map_wrapper({"n", "x", "o"}, "k", 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', { expr = true }) map_wrapper("", "", 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', { expr = true }) map_wrapper("", "", 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', { expr = true })