From 4c3eafbc2003ed865853f1f4a342b29eda95fba0 Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 19 Dec 2022 22:32:29 +0530 Subject: [PATCH] add option for cheatsheet theme and add description for some mappings --- lua/core/default_config.lua | 4 ++++ lua/core/mappings.lua | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 120b01b..131fa54 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -70,6 +70,10 @@ M.ui = { { " Themes", "Spc t f", "Telescope themes" }, }, }, + + cheatsheet = { + theme = "grid", -- simple/grid + }, } M.plugins = {} diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index c98805f..2b52096 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -64,16 +64,16 @@ M.general = { t = { [""] = { termcodes "", "escape terminal mode" } }, v = { - [""] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } }, - [""] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', 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 } }, }, 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 } }, + ["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', "move left", 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 - ["p"] = { 'p:let @+=@0:let @"=@0', opts = { silent = true } }, + ["p"] = { 'p:let @+=@0:let @"=@0', "dont copy replaced text", opts = { silent = true } }, }, }