" vimrc file; this file will be kept in your 'home directory' or the (G)VIM main directory. On Windows 7, it may be something like: " C:\Program Files (x86)\Vim\_vimrc " ... or: " C:\Program Files\Vim\_vimrc set nocompatible source $VIMRUNTIME/vimrc_example.vim source $VIMRUNTIME/mswin.vim behave mswin " Uncomment below to enable tabs-to-spaces, tabstop 4 "set expandtab "set tabstop=4 " Uncomment below to prevent things like 'tilde backup files' (eg. myfile.txt~) from being created (probably don't want this, because of 'set backupdir') "set nobackup "set noundofile " Uncomment below to cause things like 'tilde backup files' to be created in a different dir so as not to clutter up the current file's directory (probably a better idea than disabling them altogether) " NOTE: the main Windows Temp dir may require admin access; in that case you'll probably want to set these dirs to your local Temp dir, something like: " C:\Users\[username]\AppData\Local\Temp set backupdir=C:\Windows\Temp set undodir=C:\Windows\Temp set backupskip=C:\Windows\Temp set directory=C:\Windows\Temp set writebackup " Uncomment below to disable 'swap files' (eg. .myfile.txt.swp) from being created set noswapfile " Uncomment below to set default encoding to UTF8 set enc=utf-8 " Uncomment below to set default GUI font to Lucida Console, size 12 set guifont=Lucida_Console:h12:cANSI " Uncomment below to prevent line wrapping "set nowrap " Uncomment below to disable auto-indentation "filetype indent plugin off "filetype indent off " This is a nice default max. text width to use and will wrap text correctly for submissions to sites like GameFAQs set textwidth=78 if has("autocmd") autocmd FileType text setlocal textwidth=78 endif " Setup multi-byte encoding if has("multi_byte") if &termencoding == "" let &termencoding = &encoding endif set encoding=utf-8 setglobal fileencoding=utf-8 " Uncomment to have 'BOM' on by default for new files. " Note, this will not apply to the first, empty buffer created at Vim startup. "setglobal bomb set fileencodings=ucs-bom,utf-8,latin1 endif 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 =~ '\ ' . arg3 . eq endfunction