標籤:bom toggle 源碼 diff else 檔案 wim exec nmake
1、設定檔_wimrc
set fileencodings=utf-8,ucs-bom,cp936,big5set fileencoding=utf-8source $VIMRUNTIME/vimrc_example.vimsource $VIMRUNTIME/mswin.vimbehave mswin"設定預設色彩配置colorscheme blue" 設定winmanager" 設定介面分割let g:winManagerWindowLayout = "FileExplorer|TagList""設定winmanager的寬度,預設為25let g:winManagerWidth = 30let g:winManagerHeight = 80"定義開啟關閉winmanager快速鍵為F8nmap <silent> <F8> :WMToggle<cr>"在進入vim時自動開啟winmanagerlet g:AutoOpenWinManager = 1set 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 endifendfunction
2、安裝檔案管理工具和文法提示外掛程式
檔案管理工具 winmanager
文法提示 ctags
下載後解壓,把doc和plugin目錄覆蓋到vim80目錄下。
ctags需要下載源碼編譯,使用vs2005命令列編譯。nmake /f mak_mvc.mak
請閱讀readme檔案,然後把編譯得到的ctags複製到vim80目錄下,命令列執行 ctags -R
windows下wim配置成IDE