You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to make whichkey work out of the box when remapping a prefix key?
For example, in my case I am remapping C-w to <leader>w for window navigation. If I just set vim.keymap.set("n", "<leader>w", "<C-w>") in my config, then the built-in whichkey maps for C-w do not pop up when pressing <leader>w. My current workaround is to just recreate each mapping manually. I thought perhaps it might be a matter of setting the right trigger (adding { "<c-w>", mode = "n" } to triggers), but I've had no luck getting this to work.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Is there a way to make whichkey work out of the box when remapping a prefix key?
For example, in my case I am remapping
C-w
to<leader>w
for window navigation. If I just setvim.keymap.set("n", "<leader>w", "<C-w>")
in my config, then the built-inwhichkey
maps forC-w
do not pop up when pressing<leader>w
. My current workaround is to just recreate each mapping manually. I thought perhaps it might be a matter of setting the righttrigger
(adding{ "<c-w>", mode = "n" }
to triggers), but I've had no luck getting this to work.Beta Was this translation helpful? Give feedback.
All reactions