From 843ab62e01faf9327560afd8e81f036525845ebd Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Wed, 6 Sep 2023 19:44:09 +0200 Subject: [PATCH] better prefixes --- lua/plex/config/keymaps.lua | 8 ++++---- lua/plex/plugins/editor.lua | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lua/plex/config/keymaps.lua b/lua/plex/config/keymaps.lua index 4a5d166..ef505a2 100644 --- a/lua/plex/config/keymaps.lua +++ b/lua/plex/config/keymaps.lua @@ -76,9 +76,9 @@ map('n', 'zh', 'z4h') -- === -- Yank to system clipboard -map({'n', 'v', 'x'}, 'y', '"+y"') -map({'n', 'v', 'x'}, 'yy', '"+yy"') -map({'n', 'v', 'x'}, 'Y', '"+Y"') +map({'n', 'v', 'x'}, 'y', '"+y"', { desc = "yank to system"}) +map({'n', 'v', 'x'}, 'yy', '"+yy"', { desc = "yank line to system"}) +map({'n', 'v', 'x'}, 'Y', '"+Y"', { desc = "yank to system until line end"}) -- Yank buffer's relative path to clipboard map('n', 'yp', function() @@ -140,7 +140,7 @@ map('x', '', ":move'<-2gv=gv", { desc = 'Move selection up' }) map('x', '', ":move'>+gv=gv", { desc = 'Move selection down' }) -- Remove spaces at the end of lines -map('n', 'cw', 'lua MiniTrailspace.trim()', { desc = 'Erase Whitespace' }) +map('n', 'fw', 'lua MiniTrailspace.trim()', { desc = 'Erase Whitespace' }) -- Search & Replace -- === diff --git a/lua/plex/plugins/editor.lua b/lua/plex/plugins/editor.lua index a3aa9ba..39c9ffa 100644 --- a/lua/plex/plugins/editor.lua +++ b/lua/plex/plugins/editor.lua @@ -237,6 +237,7 @@ return { }, ----------------------------------------------------------------------------- + -- NOTE: THIS SECTION CONTAINS THE PREFIXES! { 'folke/which-key.nvim', event = 'VeryLazy', @@ -261,6 +262,9 @@ return { ['x'] = { name = '+diagnostics/quickfix' }, ['z'] = { name = '+notes' }, ['w'] = { name = '+window' }, + ['f'] = { name = '+formatting' }, + ['m'] = { name = '+marks/misc' }, + ['md'] = { name = '+line-diffs' }, }, }, config = function(_, opts)