From 0619ef4e1ef2e43f0bb29d53a3cec21622bda271 Mon Sep 17 00:00:00 2001 From: hoangnh280 Date: Wed, 5 Apr 2023 09:56:14 +0700 Subject: [PATCH 1/3] fix(mappings): fix description of j key in x mode --- lua/core/mappings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index b6e0140..51b7713 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -57,7 +57,7 @@ M.general = { }, x = { - ["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', "move left", opts = { expr = true } }, + ["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', "move up", opts = { expr = true } }, ["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', "move down", 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 From 3479853e698436504454cb51a3c8e1f35df22ea5 Mon Sep 17 00:00:00 2001 From: prometheusalpha Date: Wed, 5 Apr 2023 17:44:48 +0700 Subject: [PATCH 2/3] feat(mappings): add description to movement keys in normal mode --- lua/core/mappings.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 51b7713..b0cd219 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -37,10 +37,10 @@ M.general = { -- 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 - ["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 } }, + ["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', "move down", opts = { expr = true } }, + ["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', "move up", opts = { expr = true } }, + [""] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', "move up", opts = { expr = true } }, + [""] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', "move down", opts = { expr = true } }, -- new buffer ["b"] = { " enew ", "new buffer" }, @@ -57,8 +57,8 @@ M.general = { }, x = { - ["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', "move up", opts = { expr = true } }, - ["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', "move down", opts = { expr = true } }, + ["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', "move down", opts = { expr = true } }, + ["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', "move up", 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', "dont copy replaced text", opts = { silent = true } }, From 907b1125144cbbd7e64e9448132ee92743d13494 Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 5 Apr 2023 22:07:36 +0530 Subject: [PATCH 3/3] make some mapping keybinds lowercased (#1897) --- 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 b0cd219..36f18a5 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -70,14 +70,14 @@ M.tabufline = { n = { -- cycle through buffers - [""] = { + [""] = { function() require("nvchad_ui.tabufline").tabuflineNext() end, "goto next buffer", }, - [""] = { + [""] = { function() require("nvchad_ui.tabufline").tabuflinePrev() end,