vim tip: Fix the cursor keys echoing characters in insert mode | Comments (2)
Posted in Linux/Unix on 15th October 2006, 2:01 pm by Stuart
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 ~/.vimrci(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)

After step 6, press Esc to get into command mode (beep mode) first, and then do Ctrl-zz to save and exit.
Well spotted Mike, I’ve amended the instructions. Thanks.