There are keystrokes which are difficult to get on some keyboard
layouts or on some terminals. A workaround is to define a mapping with
the desired keystroke as {rhs} and something which you know how to
type, but don't need in Vim, as {lhs}. Here is an example:
When I started using Vim, I couldn't find how to get Ctrl-] on my
AZERTY keyboard. Now that's an extremely useful keystroke in Vim: in
Normal mode it finds tags (and when in the help, it follows hotlinks),
and in Insert mode it triggers an abbreviation (if there is one) for
whatever has just been typed without inserting an additional
character. Finally I added the following to my vimrc:
if exists(':map') == 2
map <F9> <C-]>
map! <F9> <C-]>
endif
Now I can follow help links with just F9 (in +eval buids because of
the :if wrapper; in any +mouse builds I can also use a double-click,
and all builds are compiled with +mouse nowadays). Years later, I
found how to get Ctrl-] on my keyboard: it's Ctrl-AltGr-$ where $ is
the key at the end of the top alphabet row, two keys to the right of
the P in AZERTYUIOP. Now that's a fairly complicated (three-finger)
keystroke combination, so I keep using F9 (and sometimes a double
click).
Maybe you can easily get Ctrl-] on your keyboard; but similar mappings
can be used for any difficult-to-reach keystrokes, keystrokes not
available on your keyboard layout in one or more of Vim's modes, or
even just keystrokes for which an alternative is desired.
Best regards,
Tony.