Mac OSX iTerm: Arrow Key Not Working in VI/VIM
If your arrow keys are not working with iTerm during using VI/VIM.
Try add this line into /etc/bashrc or .profile
TERM=linux
After that
source ~/.profile (if you edit in .profile)
source /etc/bashrc (if you edit in bashrc)
Arrow keys working in VI/VIM now? Good luck
June 23rd, 2007 at 9:45 pm
Thanks, this has been killing me. As a recent MacOSX convert not being able to use VIM was having a drastic effect on my behavior.
July 18th, 2007 at 4:13 am
THAAAAAAAAAAANKS!
July 23rd, 2007 at 10:08 am
THANK YOU SOOOO MUCH!
I wanted to throw the computer out the window for a good five minutes, and now I’m very, very happy!
Thank you soo much!
*huggles*
-Kat
July 26th, 2007 at 12:35 am
There should be an option in the installer script to add this to your user init script.
July 28th, 2007 at 1:52 am
Thank You,
You saved my VIM - iTerm live!
August 20th, 2007 at 11:02 am
Heh… nice trick. Alternatively, you can learn how to use H,J,K,L to navigate in VI/M. Beats having to use those small arrow keys in the corner…
September 25th, 2007 at 11:48 am
I don’t really like HJKL
because am a lazy fellow. 
June 5th, 2008 at 5:03 pm
It is a nice trick however I cannot navigate through yast when am in iTerm.
Anyone know how to go about it?