neovim: associate \<Ctrl+k> to show keybindings; makes them more easily discoverable

This commit is contained in:
2024-11-11 02:16:34 +00:00
parent 2684b3c1aa
commit 95d9db3973

View File

@@ -12,6 +12,8 @@ with pkgs.vimPlugins;
local wk = require("which-key")
-- in "n"ormal mode, Ctrl+k will show all keybindings
vim.api.nvim_set_keymap("n", "<C-k>", "", { callback=wk.show, desc = "show keybinds" })
-- or \<Ctrl-k>, because `\` *already* shows keybinds (but only those under \)
vim.api.nvim_set_keymap("n", "<Leader><C-k>", "", { callback=wk.show, desc = "show keybinds" })
'';
}
{
@@ -227,7 +229,7 @@ with pkgs.vimPlugins;
}
{
# show commit which last modified text under the cursor.
# trigger with `:GitMessenger` or `<leader>gm` (i.e. `\gm`)
# trigger with `:GitMessenger` or `<Leader>gm` (i.e. `\gm`)
plugin = git-messenger-vim;
}
{