Using numpad in Vi (Vim) via PuTTY

前端 未结 5 1009
无人共我
无人共我 2021-01-29 20:38

The numberpad does not work properly when using Vim through PuTTY. Instead of numbers I get

y
x
w
v
u
t
s
r
q
5条回答
  •  遥遥无期
    2021-01-29 20:59

    I have always used this set of mappings to interpret the escape sequences as numbers when $TERM=xterm

    imap Oq 1
    imap Or 2
    imap Os 3
    imap Ot 4
    imap Ou 5
    imap Ov 6
    imap Ow 7
    imap Ox 8
    imap Oy 9
    imap Op 0
    imap On .
    imap OR *
    imap OQ /
    imap Ol +
    imap OS -
    

    I think this was my original source.

提交回复
热议问题