If you need a sorted, searchable list of your current mappings to search for unused keys, you can do the following:
function! s:ShowMaps() let old_reg = getreg("a") " save the current content of register a let old_reg_type = getregtype("a") " save the type of the register as well try redir @a " redirect output to register a " Get the list of all key mappings silently, satisfy "Press ENTER to continue" silent map | call feedkeys("\<CR>") redir END " end output redirection vnew " new buffer in vertical window put a " put content of register " Sort on 4th character column which is the key(s) %!sort -k1.4,1.4 finally " Execute even if exception is raised call setreg("a", old_reg, old_reg_type) " restore register a endtry endfunction com! ShowMaps call s:ShowMaps() " Enable :ShowMaps to call the function nnoremap \m :ShowMaps<CR> " Map keys to call the function
This is a robust feature for creating vertical separation with sorted output :maps . I put it in vimrc .
The last line displays the two \ m keys for calling the function, change it as you like.
Note. As @romainl mentions, this will not include type i commands to insert text
source share