Under Mac OS X, in vim, when I issue the command "+p
using the numeric keypad for the +
in normal mode, instead of pasting stuff from the system clipboard Vim enters insert mode and inserts the letters kp
.
The same kind of thing happens to me under Linux when I have the Numlock off, however, my Apple Keyboard (usb keyboard) does not have a Numlock key, instead it has a Clear key.
Does anyone have any ideas of how to get around this and so that I can use the keypad for entering the +
in +p"
?
Best Answer
It’s Vim, feel free to remap anything to anything you want.
To detect what you numpad
+
sends to Vim pressC-v
then+
on numpad – you will see something like^[
is escape, so you may command your VimNow it should work as expected by you.
However, it would be better to do this kind of mappings not in Vim but in your terminal emulator (which you have not mentioned) by two reasons:
:map <esc>Ok +
but it won’t affect"<esc>Ok
.<esc>Ok
to something will add a delay in processing single<esc>
press (see:h timeoutlen
).