Gateway of last resort is not set

Cygwin Vim vimrc Location

Just wanted to say this:

In Vim under Cygwin the user’s vimrc is not looked up as ~/.vimrc.

One of the correct locations is ~/.vim/vimrc. It will be read whether you start your editor as “vi” or as “vim”. You can use a template to start with:

Markku@T540p ~
$ mkdir .vim

Markku@T540p ~
$ cp /usr/share/vim/vim74/vimrc_example.vim .vim/vimrc

Markku@T540p ~

If you are interested in all the possible places vi or vim checks for the virc or vimrc file, use the command “vi -V” or “vim -V” and check the first lines of the output. Example:

Markku@T540p ~
$ vi -V
fchdir() to previous dir
could not source "/etc/virc"
fchdir() to previous dir
could not source "$HOME/.virc"
fchdir() to previous dir
sourcing "~/.vim/vimrc"
finished sourcing ~/.vim/vimrc
Press ENTER or type command to continue

At least in my Cygwin installation using the default vimrc template enables the arrow keys to work correctly.

Updated: January 18, 2015 — 14:55

Leave a Reply © Markku Leiniö 2011-2017 Frontier Theme