Occasionally you'll log into a remote server and find that the cursor keys echo characters when you are in insert mode using vim. Here's how to resolve it by modifying your vimrc configuration file:
vim ~/.vimrc
i
(Enter insert mode)set t_ku= (now type Ctrl-V and press cursor up)
set t_kd= (now type Ctrl-V and press cursor down)
set t_kr= (now type Ctrl-V and press cursor right)
set t_kl= (now type Ctrl-V and press cursor left)
- Press escape to exit insert mode
Ctrl-zz
(Saves the file and exits vim)