The vimrc file

On Windows, Vim looks for its startup configuration (the vimrc file) in following order:
1. $VIM/vimrc
2. $HOME/_vimrc
3. $VIM/_vimrc

Cygwin's Vim looks for its startup configuration in following order:
1. $VIM/vimrc
2. $HOME/.vimrc

For Windows, $VIM is typically c:\program files\vim.
For Cygwin, $VIM is typically /usr/share/vim

In order to use a single location for my custom vim settings, I put them in c:\cygwin\home\username\.vimrc , and I add "source c:\cygwin\home\username\.vimrc " to the bottom of c:\program files\vim\vimrc (the sole addition to that file).

My custom vim settings are:


set ai "autoindent
set et "expandtab
set ts=4 "tabstop
set sw=4 "shiftwidth

set ic "ignorecase
set incsearch "incremental search
set hls "highlight search

set nobackup
set vb "visual bell
set matchpairs=(:),{:},[:],<:>
set ruler

map
map
map
map

map ;tc 1G:read $HOME/.vim/template_c.txtkdd6G

if has("gui_win32")
"unmap " on Windows, restore C-Y to its scroll up defaul (instead of redo)
unmap
"colo murphy
if version >= 700
set cursorline
"hi cursorline guibg=#111111
endif
endif

"map :%s/\r$//