Vim arrow keys

From EggeWiki

Using Cygwin's rxvt and vim 7.1, sometimes the arrow keys produce 'A', 'B', 'C', 'D' instead of navigating. This doesn't seem to happen locally, but usually happens when I'm logged into a Solaris machine.

Adding this to my ~/.vimrc seems to fix the problem. <geshi lang="bash">

set term=builtin_ansi

</geshi>

Another fix is often to change the terminfo. Vim comes with these built in terminals: <geshi>

   builtin_riscos
   builtin_amiga
   builtin_beos-ansi
   builtin_ansi
   builtin_pcansi
   builtin_win32
   builtin_vt320
   builtin_vt52
   builtin_xterm
   builtin_iris-ansi
   builtin_debug
   builtin_dumb

</geshi>

The fix usually looks like:

<geshi lang="bash"> export TERMINFO=~/share/terminfo </geshi>