Skip to main content
  1. Posts/

Arrow keys in iTerm not working in vi/vim

··69 words·1 min·

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