" 编码设置setencoding=utf-8setfileencodings=utf-8,chinese,latin-1,gb18030,gbk,cp936ifhas("win32")setfileencoding=chineseelsesetfileencoding=utf-8endiflanguagemessageszh_CN.utf-8" 基础设置setnocompatiblesetsofttabstop=4setshiftwidth=4settabstop=4setbs=2setautoread" read open files again when changed outside Vimsetautowrite" write a modified buffer on each :next, ...setbrowsedir=current" which directory to use for the file browsersetwildmenusetwildignore=*.bak,*.o,*.e,*~setcomplete+=k" scan the files given with the 'dictionary' optionautocmdBufEnter * lchdir %:p:h" Change the working directory to the directory containing the current filefiletypeonfiletypepluginonfiletypeindentonsyntaxon" 颜色设置colorschemekoehler" 字体设置setguifont=Consolas:h12:cANSIsetguifontwide=youyuan:h12" 折叠设置setfoldmethod=manualnnoremap<space> @=((foldclosed(line('.'))<0)?'zc':'zo')<CR>" 界面设置setshowtabline=2" 始终显示标签页setguitablabel=%{tabpagenr()}.%t\%m" 每个 tab 上显示编号setguioptions-=T" 去掉工具条setguioptions-=m" 去掉菜单setguioptions-=r" 去掉右边的滚动条setguioptions-=Lsetstatusline=%F%m%r%h%w\[FMT=%{&ff}]\[TYPE=%Y]\[POS=%l,%v][%p%%]\%{strftime(\"%d/%m/%y-%H:%M\")}
setlaststatus=2setscrolloff=3setnusetruler" 查找搜索设置setincsearch" use incremental searchsetignorecasesmartcasehlsearchincsearch" 将键盘上的 F12 健映射为执行当前文件map<F12> :!%<CR>" 使用 Ctrl+Tab 键来切换标签页map<C-TAB> :tabn<CR>" 快捷键设置" F2 - write file without confirmation" F3 - call file explorer" F4 - show tag under curser in the preview window (tag file must exist!)" F5 - open quickfix error window" F6 - close quickfix error window" F7 - display previous error" F8 - display next error" Shift-Tab - Fast switching between buffers (see below)" Ctrl-q - Leave the editor with Ctrl-q (see below)map<silent><F2> :write<CR>map<silent><F3> :Explore<CR>map<silent><F4> :exe"ptag ".expand("<cword>")<CR>map<silent><F5> :copen<CR>map<silent><F6> :cclose<CR>map<silent><F7> :cp<CR>map<silent><F8> :cn<CR>imap<silent><F2><Esc>:write<CR>imap<silent><F3><Esc>:Explore<CR>imap<silent><F4><Esc>:exe"ptag ".expand("<cword>")<CR>imap<silent><F5><Esc>:copen<CR>imap<silent><F6><Esc>:cclose<CR>imap<silent><F7><Esc>:cp<CR>imap<silent><F8><Esc>:cn<CR>map<silent><S-Tab><Esc>:if &modifiable&&!&readonly&& \ &modified<CR>:write<CR>:endif<CR>:bprevious<CR>imap<silent><S-Tab><Esc>:if &modifiable&&!&readonly&& \ &modified<CR>:write<CR>:endif<CR>:bprevious<CR>nmap<C-q> :wqa<CR>" taglist 设置noremap<silent><F11><Esc><Esc>:Tlist<CR>inoremap<silent><F11><Esc><Esc>:T