I just got a new laptop (and ASUS running Windows 10 to replace my ASUS running Windows 8.1). I'm using Putty to access my Ubuntu server on AWS and using VIM to edit some files.
When I hit my dedicated Home button, it works: my cursor moves to the front of the line. But this laptop doesn't have a dedicated End button, so I try to use the numeric keypad, but it just inserts new lines above my current line with letters: 0=p, 1=q (1 is also the End button), etc, up through 9=y.
Toggling num lk just brings up the VIM help.txt file.
What can I do to get my End key back?
I don't want to use the $ method to get to the end of the line, because that requires exiting edit mode (ESC), Shift+4 for $
then re-entering edit mode (i) and finally moving to the true end-of-line with a right arrow -- 5 key presses instead of 1, which adds a lot of time in the long run.
None of the other answers worked for me because I could not figure out how to map the line break + letter that was being inserted to something new. Luckily, I found the solution myself, here:
https://www.netsarang.com/forum/xshell/1719/Number_keypad_in_vim_insert_mode
Specifically:
Under Terminal -> Emulation:
1) Set Terminal to XTerm (optionally turn on ANSI color, works fine for me.)
2) Make sure alternate keyboard emulation is unchecked.
I literally just made those changes in Putty and everything works!