From 54e87b448e81c5a6e9dbd5b098044d4f19b52b66 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 29 Dec 2022 00:51:41 +0100 Subject: [PATCH] more keybinding description --- lua/my_keymappings.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index 6ddb858..a37c6ce 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -25,13 +25,16 @@ vim.keymap.set('x', '<', '', '>gv') local function hlWord() - local current_word = vim.call('expand','') + local current_word = vim.call('expand', '') vim.fn.setreg('/', "\\<" .. current_word .. "\\>") vim.opt.hlsearch = true end + -- Highlight word under cursor -vim.keymap.set('n', "'", hlWord, { noremap = true, silent = true }) -vim.keymap.set('x', "'", 'y/\\V"N', { noremap = true, silent = true }) +vim.keymap.set('n', "'", hlWord, { noremap = true, silent = true, desc = 'Higlight word under cursor' }) +vim.keymap.set('x', "'", 'y/\\V"N', { noremap = true, silent = true, desc = 'Highlight visual' }) -- Close Buffer -vim.keymap.set('n', '', ':bd') +vim.keymap.set('n', '', ':bd', { desc = 'Close buffer' }) + +vim.keymap.set('n', 'x', 'za', { desc = 'Toggle fold' })