Arrow key not working in vi / vim - Mac OS
Using Mac OS X for the past few days for my work, i notice my arrow key not working in vi editor. One of my colleague help me to solve this arrow key problem in vi.
Here’s the solution for those who has arrow key not working in vi / vim for Mac OS:-
- Go to your home directory, mine is at /Users/myname/
- Open your .profile and add TERM=linux at the first line of the file.
- Save and quit
- type source .profile and enter
- You just fixed the arrow key problem in vi editor. Arrow key should be working by now.
Posted at March 26th, 2008 by chua
If you think this article helps you to solve your problem and clear your headache, feel free to buy me a drink :)









April 14th, 2008 at 10:49 pm
For the record, if you find that your .profile file does not exist then just go ahead and create it and it should work fine (it did for me)