Mapping arrow keys in Vim

When remotely editing through Vim on a friend’s server, I had troubles using the arrow keys, because instead of moving the cursor, using them result in some random letters printed on the screen. After some researches I stumbled on this help (:help compatible_):
<br /> This option has the effect of making Vim either more Vi-compatible, or<br /> make Vim behave in a more useful way. When a ".vimrc" file is found while Vim is starting up, this option is switched off, and all options that have not been modified will be set to the Vim defaults.<br />
So the point is, if you have the same problems I had, you don’t want to be Vi-compatible. So simply go and touch ~/.vimrc (this will create an empty .vimrc file in your $HOME directory).

There are also other cool tricks you can do for mapping arrows keys:

Comments

Thanks a lot! The arrow keys were driving me mad!

Your post helped me a lot. Thanks!!!

There are lots of sites where you can find some pdf files, but there is the one site which can help to find necessary pdf file in a few seconds. it is http://www.pdfqueen.com pdf SE.