This page contains the contents of the configuration files I use for gVim 7 under Windows.
Note that lines beginning with a double quote (”) are comments.
The contents of my _vimrc is as follows:
set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin
set diffexpr=MyDiff()
function MyDiff()
let opt = '-a --binary '
if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
let arg1 = v:fname_in
if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
let arg2 = v:fname_new
if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
let arg3 = v:fname_out
if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
let eq = ''
if $VIMRUNTIME =~ ' '
if &sh =~ '\<cmd'
let cmd = '""' . $VIMRUNTIME . '\diff"'
let eq = '"'
else
let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
endif
else
let cmd = $VIMRUNTIME . '\diff'
endif
silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq
endfunction
"-----------------------------------------------------------------------
" My changes ( PH, 10/5/2006 )
" expand tabs (to spaces)
set et
" set tab width to 2 spaces
set tabstop=2
set shiftwidth=2
" copy indentation to next line
set autoindent
" guess indentation of next line based on source code brackets
set smartindent
" Makefiles need to have genuine tab character codes in them
autocmd FileType make set noexpandtab shiftwidth=8
" no word wrapping for source code files
autocmd FileType c,cpp,h,cxx,rc,cs,make,prm,def set nowrap
" briefly highlight matching bracket
set showmatch
" Switch on search pattern highlighting.
set hlsearch
" dark background
"set background=dark
" Ctrl + Tab = next tab
map <C-Tab> :tabnext<CR>
map! <C-Tab> <ESC>:tabnext<CR>
" Ctrl + Shift + Tab = previous tab
map <C-S-Tab> :tabprev<CR>
map! <C-S-Tab> <ESC>:tabprev<CR>
" F2 = new tab
map <F2> :tabnew<CR>
map! <F2> <ESC>:tabnew<CR>
" Shift + F2 = open a new tab then show open file dialog
map <S-F2> :tabnew<CR>:browse confirm e<CR>
map! <S-F2> <ESC>:tabnew<CR>:browse confirm e<CR>
" F3 = save
map <F3> :w<CR>
map! <F3> <ESC>:w<CR>i
" F4 = comment/uncomment current line
" this is mapped/defined in a plugin
" F5 = insert comment separator line of //'s above the current line
map <F5> O<ESC>0d$i////////////////////////////////////////////////////////////////////////////////<ESC>j^
map! <F5> <ESC>O<ESC>0d$i////////////////////////////////////////////////////////////////////////////////<ESC>j^i
" F5 = insert comment separator line of //'s above the current line
map <S-F5> O<ESC>0d$i---------------------------------------------------------------------------------<ESC>j^
map! <S-F5> <ESC>O<ESC>0d$i---------------------------------------------------------------------------------<ESC>j^i
The contents of my _gvimrc is as follows:
" Set font set guifont=Courier_New:h8:cANSI " Set color scheme "colorscheme desert colorscheme moria