I am not very good with vimscript, but I am trying to do some custom mappings in Vim. What I want to do is map <leader>h
to switch to the previous tab, but when I press <leader>
followed by h
, it's waiting for another key and doesn't switch quickly. Is there a way to see what mappings are there starting with the "h" key and unmapping them? Or maybe another, more elegant solution?
Thanks, H.
To see all your mappings, type :map
. To see what mapping(s) apply to a given prefix, like your h
situation, type :map <leader>h
.
What’s likely happening is that you have some other h
-mappings that take multiple characters. E.g., if you also have map <leader>hx
, then vim will pause for timeoutlen
milliseconds (see :help tm
and also ttm
) before trying to honor your shorter <leader>h
, in case you’re actually trying to type the longer one.
So you’ll need to track down where your longer mapping are coming from and possibly remove them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With