arrows not working correctly on VI or VIM ...
fix:
Go to your home directory, ( in my case /Users/crivero/ )
Open your .profile and add
TERM=linux
at the first line of the file. Save and quit
DONE!
now you need to logout and login again ... or just type:
source .profile