Reputation: 63
How can I view/list only the <F#>
keys with :map
? I need to know what <F#>
is doing... Newbie here!
Upvotes: 6
Views: 460
Reputation: 5043
To Extend Jeets solution by mapping it in your .vimrc .
I'm always changing the configuration of my Function Keys so it's really useful to be able to remind myself what's there.
Just type ,f in normal mode to list the Function keys F1-F12
:nnoremap ,f :for i in range(1, 12) <bar> execute("map <F".i.">") <bar> endfor
Upvotes: 0
Reputation: 39817
Entering the following will list function key mappings for to :
:for i in range(1, 12) | execute("map <F".i.">") | endfor
If you add a "verbose", you will be told where the key mappings were defined:
:for i in range(1, 12) | execute("verbose map <F".i.">") | endfor
If you have more than 12 function keys, adjust the second parameter of the "range()" expression accordingly.
Upvotes: 6
Reputation: 59287
:map
(without arguments) shows all the maps available for n, v and o
modes. For the other modes, try the correspondent command (for example :imap
for insert mode).
Now it's just a matter of skimming the output looking for function key maps. If you give the command a specific key:
:nmap <F4>
That map will be presented.
Upvotes: 2
Reputation: 12413
you can just write
:map <F1>
to find out what the key is mapped to. I other mappings like the ones that
start with \
you can type
:map \
and vim will list all mappings starting with \
for for the function keys I think you have to check them individually.
Upvotes: 2