if v:lang =~ "^ko" set fileencodings=euc-kr set guifontset=-*-*-medium-r-normal--16-*-*-*-*-*-*-* elseif v:lang =~ "^ja_JP" set fileencodings=euc-jp set guifontset=-misc-fixed-medium-r-normal--14-*-*-*-*-*-*-* elseif v:lang =~ "^zh_TW" set fileencodings=big5 set guifontset=-sony-fixed-medium-r-normal--16-150-75-75-c-80-iso8859-1,-taipei-fixed-medium-r-normal--16-150-75-75-c-160-big5-0 elseif v:lang =~ "^zh_CN" set fileencodings=gb2312 set guifontset=*-r-* endif if v:lang =~ "utf8$" || v:lang =~ "UTF-8$" set fileencodings=utf-8 endif set nocompatible " Use Vim defaults (much better!) set bs=2 " allow backspacing over everything in insert mode "set ai " always set autoindenting on "set backup " keep a backup file set viminfo='20,\"50 " read/write a .viminfo file, don't store more " than 50 lines of registers set history=50 " keep 50 lines of command line history set ruler " show the cursor position all the time " Only do this part when compiled with support for autocommands if has("autocmd") " In text files, always limit the width of text to 78 characters autocmd BufRead *.txt set tw=78 " When editing a file, always jump to the last cursor position autocmd BufReadPost * \ if line("'\"") > 0 && line ("'\"") <= line("$") | \ exe "normal g'\"" | \ endif endif " Don't use Ex mode, use Q for formatting map Q gq " Switch syntax highlighting on, when the terminal has colors " Also switch on highlighting the last used search pattern. if &t_Co > 2 || has("gui_running") syntax on set hlsearch endif if has("autocmd") augroup cprog " Remove all cprog autocommands au! " When starting to edit a file: " For C and C++ files set formatting of comments and set C-indenting on. " For other files switch it off. " Don't change the order, it's important that the line with * comes first. autocmd FileType * set formatoptions=tcql nocindent comments& autocmd FileType c,cpp set formatoptions=croql cindent comments=sr:/*,mb:*,el:*/,:// augroup END augroup gzip " Remove all gzip autocommands au! " Enable editing of gzipped files " read: set binary mode before reading the file " uncompress text in buffer after reading " write: compress file after writing " append: uncompress file, append, compress file autocmd BufReadPre,FileReadPre *.gz set bin autocmd BufReadPost,FileReadPost *.gz let ch_save = &ch|set ch=2 autocmd BufReadPost,FileReadPost *.gz '[,']!gunzip autocmd BufReadPost,FileReadPost *.gz set nobin autocmd BufReadPost,FileReadPost *.gz let &ch = ch_save|unlet ch_save autocmd BufReadPost,FileReadPost *.gz execute ":doautocmd BufReadPost " . expand("%:r") autocmd BufWritePost,FileWritePost *.gz !mv :r autocmd BufWritePost,FileWritePost *.gz !gzip :r autocmd FileAppendPre *.gz !gunzip autocmd FileAppendPre *.gz !mv :r autocmd FileAppendPost *.gz !mv :r autocmd FileAppendPost *.gz !gzip :r augroup END endif if &term=="xterm" set t_Co=8 set t_Sb=^[4%dm set t_Sf=^[3%dm endif " some extra commands for HTML editing nmap ,mh wbgueyei<ea>pa>bba nmap ,h1 _i

A

nmap ,h2 _i

A

nmap ,h3 _i

A

nmap ,h4 _i

A

nmap ,h5 _i
A
nmap ,h6 _i
A
nmap ,hb wbieabb nmap ,he wbieabb nmap ,hi wbieabb nmap ,hu wbieabb nmap ,hs wbieabb nmap ,ht wbieabb nmap ,hx wbFf