set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswinvim
set 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 . eq
endfunctionide
set cursorline " 當前光標所在行會有陰影字體
"打開語法高亮
syntax onui
"tab轉空格的一坨設置
set shiftwidth=4
set sts=4
set tabstop=4
set expandtab插件
"自動縮進設置
set cindent
set smartindent
set incsearch
set autoindentorm
"顯示行號
set nuip
" 不要備份
set nobackuputf-8
"設置colormode
colorscheme desertci
" Monaco字體
set guifont=Courier_New:h12rem
" 更新時間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 on
filetype plugin on
filetype indent on
"設置搜索結果高亮顯示
set hlsearch
"設置記錄的歷史操做列表
set history=50
"設置摺疊
set foldcolumn=2
set foldmethod=indent
set foldlevel=3
"Set mapleader
let mapleader = '\' " leader用反斜槓\
map <leader><leader> \be " 雙反斜槓\\便可打開bufexplorer
map C-Enter C-Tab " Ctrl+Enter也能夠切換buffer
"Taglist插件的一坨設置
let g:Tlist_Use_Right_Window=1
"let g:Tlist_Auto_Open=1
let g:Tlist_Show_One_File=1
let g:Tlist_Compact_Format=1
let g:Tlist_Enable_Fold_Column=0
let 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 ~x
set encoding=utf-8set 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