記錄一下幼东。
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
if $VIMRUNTIME =~ ' '
if &sh =~ '\<cmd'
if empty(&shellxquote)
let l:shxq_sav = ''
set shellxquote&
endif
let cmd = '"' . $VIMRUNTIME . '\diff"'
else
let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
endif
else
let cmd = $VIMRUNTIME . '\diff'
endif
silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3
if exists('l:shxq_sav')
let &shellxquote=l:shxq_sav
endif
endfunction
"----------------------------- 配置弯院,雙引號后面為注釋掉的內(nèi)容 ---------------------------------
"顯示中文不亂碼
let &termencoding=&encoding
set fileencodings=utf-8,gbk,ucs-bom,cp936,chinese,ucs-bom
"永久顯示行號
set nu!
"colorscheme evening "配色方案
set tabstop=4 "設(shè)置tab的跳數(shù)
set autoread "設(shè)置當文件在外部被修改,自動更新該文件
set mouse=a "設(shè)置在任何模式下鼠標都可用
set nobackup "設(shè)置不生成備份文件
"設(shè)置不生成 .un 文件
set noundofile
set nobackup
set noswapfile
"===========================
"查找/替換相關(guān)的設(shè)置
"===========================
set hlsearch "高亮顯示查找結(jié)果
set incsearch "增量查找
"===========================
"狀態(tài)欄的設(shè)置
"===========================
set statusline=[%F]%y%r%m%*%=[Line:%l/%L,Column:%c][%p%%] "顯示文件名:總行數(shù),總的字符數(shù)
set ruler "在編輯過程中币狠,在右下角顯示光標位置的狀態(tài)行
"
"===========================
"代碼設(shè)置
"===========================
syntax enable "打開語法高亮
syntax on "打開語法高亮
set showmatch "設(shè)置匹配模式藤肢,相當于括號匹配
set smartindent "智能對齊
"set shiftwidth=4 "換行時,交錯使用4個空格
set autoindent "設(shè)置自動對齊
set ai! "設(shè)置自動縮進
"set cursorcolumn "啟用光標列
set cursorline "啟用光標行
set guicursor+=a:blinkon0 "設(shè)置光標不閃爍
set fdm=indent "代碼縮進折疊
"===========================
"多文件編輯
"===========================
"let g:miniBufExplMapCTabSwitchBufs=1
"let g:miniBufExplMapWindowsNavVim=1
"let g:miniBufExplMapWindowNavArrows=1