.vimrc
Author
Zhou Renjian
Create@
2007-02-05 14:41
set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin
colorscheme torte
"set shiftwidth=4
"set expandtab
"set tabstop=4
"set smarttab
"set nobackup
" set Soft Tab Stop
" we should use 4 spaces as TAB
"
set softtabstop=4
" set Tab Stop
"
set tabstop=4
" don't use Tab Stop
" NOTE: if you wanna view or edit files with 'real' TAB char properly, e.g.
" Makefile for GNU make, please enter ':set noet' command to abjust TAB stop
" temporarily.
"
set expandtab
"Replace ALL Tab char with Space
auto BufReadPost *.h retab! 4
auto BufReadPost *.c retab! 4
auto BufReadPost *.cpp retab! 4
auto BufReadPost *.cxx retab! 4
auto BufReadPost makefile.inc set noexpandtab
auto BufReadPost makefile.gnu set noexpandtab
auto BufReadPost makefile set noexpandtab
auto FileChangedShell * e!
"set Smart Indent
set smartindent
" set Auto Indent
"
set autoindent
set sw=4
" set Auto Write
"
"set autowrite
" suppress Beep
"
"set novisualbell
" set line number
"
" set number
"set paste
"set paste
"auto BufReadPost * set paste
" disable backup
"
set nowritebackup
set nobackup
"set swap file dir
"set dir=d:\temp\vitemp
"set backup file dir
"set backupdir=d:\temp\vitemp
"Set File Encoding To use simplified Chinese encoding
set fileencoding=prc
let g:miniBufExplMapWindowNavVim = 1
let g:miniBufExplMapWindowNavArrows = 1
let g:miniBufExplMapCTabSwitchBufs = 1
let g:miniBufExplModSelTarget = 1
let Tlist_Inc_Winwidth=0
map <F8> :TlistToggle<Enter>
map <F7> i <Esc>x:w<Enter>
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