Sometimes my mapping not working since overridden by plug-in or I forget a mapping and want to select from all my mappings list.
All List
If you want to get all your key mappings run:
:map <key>
Specific Key
If you only want to know specific key(s) run:
:map <key>
Like examples below:
:map <leader>f
:map H
:map <F8>
Verbose Mode - Show Overridden
If you can't use your mapping and want to know what overrides it just run with
verbose
:
:verbose map <key>
This will show all configs that uses given mapping in a list and last
set location:
Also it is possible to use :map
with visual
, normal
, insert
etc. as
well:
:vmap rn
:nmap rn
:imap rn
All done!
Top comments (1)
Nice article Serhat.
The *map command are recursive which can cause issues with plugins that map to the same keys.
Here is an example:
You want
x
to move the cursor down a line but the plugin mapsj
to delete one character.Now when you press
x
to move down one line you end up deleting a character.Now both mappings work.
It is much better to use nnoremap, inoremap, vnoremap to map your keys.