供vim爱好者参考。我自己最喜欢gui模式下desert这种配色,可是试验了半天,也不能把这种颜色加到我这个blog背景中,所以干脆自己又做了一个desert配色的html,欢迎下载下来看看。顺便说一句,在不断使用的途中我会不断修改这个配置文件,修改的内容我只更新在位于我主页仓库的这个链接中,这里就不再更新了。还有就是直接在这里看存在字符编码不合适导致乱码问题,如果你对出现乱码的地方比较感兴趣,建议下载附件或者通过上面这个链接来看。好了,欢迎点击进入观看配置信息。

“”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"
” Import external source
“”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"
source $VIM/vim70/mswin.vim

“”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"
” General
“”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”
set nocompatible ” get out of horrible vi-compatible mode
filetype on ” detect the type of file
set history=100 ” How many lines of history to remember
set ffs=unix,dos,mac ” support all three, in this order
filetype plugin indent on ” load filetype plugins
set viminfo+=! ” make sure it can save viminfo
set isk+=_,$,@,%,#,- ” none of these should be word dividers, so make them not be
set helplang=cn ” chinese help

“”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"
” Theme/Colors
“”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"
set background=dark ” we are using a dark background
syntax on ” syntax highlighting on
if has(“gui_running”)
colorscheme desert
else
colorscheme evening
endif

“”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"
” Files/Backups
“”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"
set nobackup ” make backup file
set autowrite ” auto writefile when sth happened such as :make or :last or others.See the help
set makeef=error.err ” When using make, where should it dump the file

“”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"
” Vim UI
“”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"
set wildmenu ” turn on wild menu
set ruler ” Always show current positions along the bottom
set cmdheight=1 ” the command bar is 1 high
set nonumber ” turn off line numbers
set numberwidth=4 ” minimum width to use for the number column,not a fix size
set hid ” you can change buffer without saving
set backspace=2 ” make backspace work normal
set whichwrap+=<,>,h,l ” backspace and cursor keys wrap to
set mouse=a ” use mouse everywhere
set shortmess=atI ” shortens messages to avoid ‘press a key’ prompt
set report=0 ” tell us when anything is changed via :…
set lz ” do not redraw while running macros (much faster) (LazyRedraw)
” make the splitters between windows be blank
set fillchars=vert:\ ,stl:\ ,stlnc:\
“set lsp=0 ” space it out a little more (easier to read)

“”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"
” Visual Cues
“”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"
set showmatch ” show matching brackets
set hlsearch ” do highlight searched for phrases
set incsearch ” BUT do highlight as you type you search phrase
set listchars=tab:\|\ ,trail:.,extends:>,precedes:<,eol:$ ” what to show when I hit :set list
set so=15 ” Keep 10 lines (top/bottom) for scope
set novisualbell ” don’t blink
set noerrorbells ” no noises for error
set vb t_vb= ” no noises for other
set laststatus=2 ” always show the status line

“”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"
” File encode
“”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"
set encoding=utf-8
set fileencoding=chinese
set fileencodings=ucs-bom,utf-8,chinese

“”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"
” Text Formatting/Layout
“”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”
set formatoptions+=mM ” for charactors fold and patch
set ai ” autoindent
set si ” smartindent
set cindent ” do c-style indenting
set tabstop=8 ” tab spacing (settings below are just to unify it)
set softtabstop=8 ” unify
set shiftwidth=8 ” unify
set expandtab ” 8 space instead of tab
set nowrap ” do not wrap lines
set smarttab ” use tabs at the start of a line, spaces elsewhere
set dictionary=/usr/share/dict/american-english “use dictionary when input the english word

“”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"
” Folding
” Enable folding, but by default make it act like folding is off, because folding is annoying in anything but a few rare cases
“”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"
set foldenable ” Turn on folding
set foldlevel=100 ” Don’t autofold anything (but I can still fold manually)
set foldopen-=search ” don’t open folds when you search into them
set foldopen-=undo ” don’t open folds when you undo stuff

“”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"
” File Explorer
“”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”
let g:explVertical=1 ” should I split verticially
let g:explWinSize=35 ” width of 35 pixels

“”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"
” Win Manager
“”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”
let g:winManagerWidth=35 ” How wide should it be( pixels)
let g:winManagerWindowLayout = ‘FileExplorer,TagsExplorer|BufExplorer’ ” What windows should it

“”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"
” CTags and Taglist
“”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”
let Tlist_Ctags_Cmd = “/usr/bin/ctags-exuberant” ” Location of my ctags
let Tlist_Sort_Type = “name” ” order by
let Tlist_Use_Right_Window = 0 ” split to the left side of the screen
let Tlist_Compart_Format = 1 ” show small meny
let Tlist_Exist_OnlyWindow = 1 ” if you are the last, kill yourself
let Tlist_File_Fold_Auto_Close = 0 ” Do not close tags for other files
let Tlist_Enable_Fold_Column = 0 ” Do not show folding tree

set tags=./tags,./../tags,./../../tags,./**/tags,tags “/usr/include/tags ” which tags files CTRL-] will search
set autochdir ” auto change the current dierctory when you open the file or window or any other buffer
set makeef=makeerror.err
set path=.,./../**,/usr/include/*,,

“”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"
” Minibuf
“”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”
let g:miniBufExplTabWrap = 1 ” make tabs show complete (no broken on two lines)
let g:miniBufExplModSelTarget = 1

“”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"
” Matchit
“”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"
let b:match_ignorecase = 1

“”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"
” Mappings
“”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”
map ” right arrow (normal mode) switches tabs
map ” left arrow (normal mode) switches tabs
map :TlistToggle
” open and close the taglist
map ^i// ” insert remark flag
map :s?\/\/??
” delete remark flag
inoremap  ” F8 to omni completion
“map :Sex ” up arrow (normal mode) brings up a file list
“map :Tlist ” down arrow (normal mode) brings up the tag list
“map ggVGg? ” encypt the file (toggle)

“”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"
” Autocommands
“”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"
au BufEnter /usr/include/c++/* setf cpp ” all the file under the directory are recognized as cpp files by vim
au bufwinenter *.c,*.cpp silent loadview ” autoload the file’s last view
au bufwinleave *.c,*.cpp mkview ” autosave the file’s current view
“au BufWritePost *.c,*.cpp,*.cc,*.h !ctags-exuberant * -R

au filetype c,cpp,verilog map ^i// ” insert remark flag ,for c/c++/verilog
au filetype c,cpp,verilog map :s?\/\/??
:nohl
” delete remark flag ,for c/c++/verilog
au fileType c,cpp,verilog set expandtab ” use space instead of tab in editing code
“au filetype * map ^i# ” insert remark flag ,for default,bash script most
“au filetype * map :s?#??
:nohl
” delete remark flag ,for default,bash script most
au BufRead,BufNewFile *vimrc*,*.vim map ^i” ” insert remark flag ,for vim script
au BufRead,BufNewFile *vimrc*,*.vim map :s?”??
:nohl
” delete remark flag ,for vim script

” vim -b : edit binary using xxd-format!
augroup Binary
au!
au BufReadPre *.bin let &bin=1
au BufReadPost *.bin if &bin | %!xxd
au BufReadPost *.bin set ft=xxd | endif
au BufWritePre *.bin if &bin | %!xxd -r
au BufWritePre *.bin endif
au BufWritePost *.bin if &bin | %!xxd
au BufWritePost *.bin set nomod | endif
augroup END

” if there are any error space(the end of line or before the tabs) in c/c++ code,highlight it
“if $VIM_HATE_SPACE_ERRORS != ’0′
“let c_space_errors=1
“endif

“”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"
” Useful abbrevs
“”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”"”
“iab xasp <%@language=jscript%><%%><
“iab xdate =strftime(“%d/%m/%y %H:%M:%S”)
“iab { {
}
“iab ( ()i
“iab [ []i