set nocompatible
source $VIMRUNTIME/vimrc_example.vimsource $VIMRUNTIME/mswin.vimbehave mswinset diffexpr=MyDiff()
function MyDiff() let opt = '-a --binary ' let g:snip_set_textmate_cp=1 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 . eqendfunctionset cursorline " 当前光标所在行会有阴影
"打开语法高亮
syntax on"tab转空格的一坨设置
set shiftwidth=4set sts=4set tabstop=4set expandtab"自动缩进设置
set cindentset smartindentset incsearchset autoindent"显示行号
set nu" 不要备份
set nobackup"设置colormode
colorscheme desert" Monaco字体
set guifont=Courier_New:h12 " 更新时间200毫秒,针对taglist插件set ut=200"Show matching bracets
set showmatch"Get out of VI's compatible mode
set nocompatible"Set to auto read when a file is changed from the outside
set autoread"Enable filetype plugin
filetype onfiletype plugin onfiletype indent on"设置搜索结果高亮显示
set hlsearch"设置记录的历史操作列表
set history=50"设置折叠
set foldcolumn=2set foldmethod=indentset foldlevel=3 "Set mapleaderlet mapleader = '\' " leader用反斜杠\map <leader><leader> \be " 双反斜杠\\即可打开bufexplorermap C-Enter C-Tab " Ctrl+Enter也可以切换buffer"Taglist插件的一坨设置
let g:Tlist_Use_Right_Window=1"let g:Tlist_Auto_Open=1let g:Tlist_Show_One_File=1let g:Tlist_Compact_Format=1let g:Tlist_Enable_Fold_Column=0let Tlist_Ctags_Cmd="'d:\Program Files\vim\vim71\plugin\ctags\ctags.exe'"nnoremap <F12> :TlistToggle<CR>"Calendar map
nnoremap <F11> :Calendar<CR>"load project plugin
nnoremap <F10> :Project<CR>"gvim打开以后最大化
au GUIEnter * simalt ~xset encoding=utf-8
set fileencodings=utf-8,chinese,latin-1if has("win32")set fileencoding=chineseelseset fileencoding=utf-8endif"解决菜单乱码source $VIMRUNTIME/delmenu.vimsource $VIMRUNTIME/menu.vim"解决consle输出乱码language messages zh_CN.utf-8