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

Related posts:

  1. iTerm, Screen & Linux is not playing well Problem : When connecting to Linux box and use screen...
  2. How to View Chinese Character with iTerm in Mac OSX I guess most people use iTerm in Mac OSX, me...
  3. screen in FreeBSD default to csh as suppose to bash (preferred) After changing bash shell to a new user using chsh,...
  4. postgresql82-server compile error on Apple Leopard with Macports 1.5 I wasn’t able to compile postgresql82-server on my machine, it’s...
  5. split – but no destination parameter to specify first : cd /destination/directory second : split /source/directory/big-huge-file prefix-to-apply-onto-splited-files Voila...
  6. Problem Upgrade Apache2 on MacPorts I was trying to upgrade apache2 on my Macports but...
  7. MySQL Cannot Connect with PHP in OSX I think some of you might have problem connecting to...
  8. How to Edit Cell in Microsoft Excel on Mac OSX Leopard Many windows user may know that F2 is the shortcut...
  9. Workflow with Automator … I have always use my mac for surfing, emailing, messaging...
  10. Changing Default Mail Application in Mac OS X No matter how many times I tried to configured Thunder...

Tags: , ,

9 Responses to “Mac OSX iTerm: Arrow Key Not Working in VI/VIM”

  1. Ómar Kjartan Says:

    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.

  2. joe Says:

    THAAAAAAAAAAANKS!

  3. Kaitlyn Says:

    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! :D

    *huggles*
    -Kat

  4. Mar Says:

    There should be an option in the installer script to add this to your user init script.

  5. Rene Jochum Says:

    Thank You,
    You saved my VIM – iTerm live!

  6. eepohboy Says:

    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…

  7. Paul Ooi Says:

    I don’t really like HJKL :P because am a lazy fellow. :)

  8. Bushmaster Says:

    It is a nice trick however I cannot navigate through yast when am in iTerm.
    Anyone know how to go about it?

  9. frank Says:

    Tanks alot!

Leave a Reply