Arrow keys in iTerm not working in vi/vim

I found myself pretty darned frustrated when my arrow keys didn't work in iTerm in vi/vim or other ncurses-based applications. However, give this a shot in an iTerm if you find yourself in the same predicament:

export TERM=linux

Then open something in vi/vim or run an ncurses application. It should let your arrow keys work normally now. To make the setting stick, just do this:

echo "TERM=linux" >> ~/.profile

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Printed from: http://rackerhacker.com/2007/05/31/arrow-keys-in-iterm-not-working-in-vivim/ .
© Major Hayden 2010.

Leave a Reply