" vim:shiftwidth=2:tabstop=8:expandtabif has('autocmd')" Remove ALL autocommands for the current groupau!" Mark .asm files MASM-type assemblyau BufNewFile,BufReadPre *.asm let b:asmsyntax='masm'
endifif has('gui_running')let do_syntax_sel_menu=1
endifif has('gui_running') && $LANG !~ '\.'set encoding=utf-8
endifset nocompatible
source $VIMRUNTIME/vimrc_example.vimset autoindent
set nobackup
set showmatch
set formatoptions+=mM
set fileencodings=ucs-bom,utf-8,gbk
set statusline&#61;%<%f\ %h%m%r%&#61;%k[%{(&fenc&#61;&#61;\"\")?&enc:&fenc}%{(&bomb?\",BOM\":\"\")}]\ %-14.(%l,%c%V%)\ %P
if has(&#39;mouse&#39;)set mouse&#61;a
endif
if has(&#39;multi_byte&#39;) && v:version > 601if v:lang &#61;~? &#39;^\(zh\)\|\(ja\)\|\(ko\)&#39;set ambiwidth&#61;doubleendif
endif" Key mappings to ease browsing long lines
noremap
noremap
noremap
noremap
inoremap
inoremap
nnoremap
vnoremap
nnoremap
vnoremap
nmap
imap
nmap
imap
nmap
nmap
if !has(&#39;gui_running&#39;)" Do not increase the windows width in the taglist.vim pluginif has(&#39;eval&#39;)let Tlist_Inc_Winwidth&#61;0endif" Set text-mode menuif has(&#39;wildmenu&#39;)set wildmenuset cpoptions-&#61;
endifif has(&#39;autocmd&#39;)function! SetFileEncodings(encodings)let b:my_fileencodings_bak&#61;&fileencodingslet &fileencodings&#61;a:encodingsendfunctionfunction! RestoreFileEncodings()let &fileencodings&#61;b:my_fileencodings_bakunlet b:my_fileencodings_bakendfunctionfunction! CheckFileEncoding()if &modified && &fileencoding !&#61; &#39;&#39;exec &#39;e! &#43;&#43;enc&#61;&#39; . &fileencodingendifendfunctionfunction! ConvertHtmlEncoding(encoding)if a:encoding &#61;&#61;? &#39;gb2312&#39;return &#39;gbk&#39; " GB2312 imprecisely means GBK in HTMLelseif a:encoding &#61;&#61;? &#39;iso-8859-1&#39;return &#39;latin1&#39; " The canonical encoding name in Vimelseif a:encoding &#61;&#61;? &#39;utf8&#39;return &#39;utf-8&#39; " Other encoding aliases should follow hereelsereturn a:encodingendifendfunctionfunction! DetectHtmlEncoding()if &filetype !&#61; &#39;html&#39;returnendifnormal m&#96;normal ggif search(&#39;\c&#39;) !&#61; 0let reg_bak&#61;&#64;"normal y$let charset&#61;matchstr(&#64;", &#39;text/html; charset&#61;\zs[-A-Za-z0-9_]\&#43;&#39;)let charset&#61;ConvertHtmlEncoding(charset)normal &#96;&#96;let &#64;"&#61;reg_bakif &fileencodings &#61;&#61; &#39;&#39;let auto_encodings&#61;&#39;,&#39; . &encoding . &#39;,&#39;elselet auto_encodings&#61;&#39;,&#39; . &fileencodings . &#39;,&#39;endifif charset !&#61;? &fileencoding &&\(auto_encodings &#61;~ &#39;,&#39; . &fileencoding . &#39;,&#39; || &fileencoding &#61;&#61; &#39;&#39;)silent! exec &#39;e &#43;&#43;enc&#61;&#39; . charsetendifelsenormal &#96;&#96;endifendfunctionfunction! GnuIndent()setlocal cinoptions&#61;>4,n-2,{2,^-2,:2,&#61;2,g0,h2,p5,t0,&#43;2,(0,u0,w1,m1setlocal shiftwidth&#61;2setlocal tabstop&#61;8endfunctionfunction! RemoveTrailingSpace()if $VIM_HATE_SPACE_ERRORS !&#61; &#39;0&#39; &&\(&filetype &#61;&#61; &#39;c&#39; || &filetype &#61;&#61; &#39;cpp&#39; || &filetype &#61;&#61; &#39;vim&#39;)normal m&#96;silent! :%s/\s\&#43;$//enormal &#96;&#96;endifendfunction" Highlight space errors in C/C&#43;&#43; source files (Vim tip #935)if $VIM_HATE_SPACE_ERRORS !&#61; &#39;0&#39;let c_space_errors&#61;1endif" Use Canadian spelling convention in engspchk (Vim script #195)let spchkdialect&#61;&#39;can&#39;" Show syntax highlighting attributes of character under cursor (Vim" script #383)map
endif