我的vim配置:

========================================================================================================================

"设置起始位置winpos 10 180"设置窗口大小set lines=30 columns=108"设置编码set encoding=utf-8set fileencoding=gb18030set fileencodings=utf-8,shift-jis,gbk,gb18030,cp936,utf-16,big5,ucs-bom,chinese,lati
"设置语言set langmenu=zh_CN.UTF-8set helplang=cn
"设置语法高亮syntax enablesyntax on
"设置配色方案set t_Co=256"colorscheme ron"colorscheme blue"colorscheme darkblue"colorscheme default"colorscheme delek"colorscheme wombat"colorscheme elflord"colorscheme evening"colorscheme koehler"colorscheme morning"colorscheme murphy"colorscheme pablo"colorscheme peachpuff"colorscheme shine"colorscheme slate"colorscheme torte"colorscheme zellnercolorscheme lucius
"设置可以在buffer的任何地方使用鼠标set mouse=aset selection=exclusiveset selectmode=mouse,key
"高亮显示匹配的括号set showmatch
"去除vi一致性set nocompatible
"设置行号set numberset numberwidth=5
"TAB键的宽度set tabstop=4set softtabstop=4set shiftwidth=4set expandtabset textwidth=79
"在行和段开始处使用制表符set smarttabset listchars=tab:▸\ ,trail:·,extends:#,nbsp:· 
"自动缩进set autoindentset cindent
"去掉错误输入时的提示声音set noerrorbellsset novisualbellset t_vb=set tm=500
"为C语言提供自动缩进set smartindent
"为C/C++设置详细的信息缩进 set cinoptions={0,1s,t0,n-2,p2s,(03s,=.5s,>1s,=1s,:1s 
"默认情况下不显示不可见字符set nolistset undolevels=1000
"记录VIM历史行数set history=100
"禁止生成临时文件set nobackupset noswapfile
"每行内插入两空行set joinspacesset gdefault
"搜索忽略大小写set ignorecase
"搜索逐字符高亮set hlsearchset incsearch
"匹配括号高亮时间set matchtime=2set infercaseset smartcase
"注释格式化选项set formatoptions=rq
"设置三种格式支持所有set fileformats=unix,dos,mac
"行内替换set gdefault
"在编辑过程中,在右下角显示光标位置状态行set ruler
"在状态行显示命令行set showcmd
"带有如下符号的单词不要被换行分割set iskeyword+=_,$,@,%,#,-
"字符间插入的像素行数目set linespace=0
"增强模式中的命令行自动完成操作set wildmenu
"增强模式打开列表set wildmode=list:longest
"使用backspace正常处理indent,eol,startset backspace=indent,eol,start
" 允许backspace和光标键跨越行边界 set whichwrap+=b,s,h,l<,>,~,[,] " ']' Insert and Replace " '[' Insert and Replace " '~' Normal " '>' <Right> Normal and Visual " '<' <Left> Normal and Visual " 'l' Normal and Visual (no recommended) " 'h' Normal and visual (no recommended) " 's' <Space> Normal and Visual " 'b' <BS> Normal and Visual 
"隐藏buff非关闭它 set hidden 
"显示已打开窗口,快速修复缓冲区,而不是打开新文件 set switchbuf=useopen 
"通过使用:commands命令,告诉我们文件的哪一行被改变过set report=0
" 在被分割的窗口间显示空白,便于阅读 set fillchars=vert:\ ,stl:\ ,stlnc:\ 
"光标移动到无效位置 set virtualedit=all 
" 光标移动到buffer的顶部和底部时保持3行距离 set scrolloff=3 
"keep 5 lines at the size set sidescrolloff=10 
"缩短消息,避免按键提示 set shortmess=aOstT 
"禁用mode lines (安全措施) set nomodeline 
"自动写入缓冲区 set autowrite 
"设置当文件被外部改变的时候自动读入文件 if exists("&autoread") set autoread 
endif 
"保存全局变量set viminfo+=!
"侦查文件类型filetype on
"载入文件类型插件filetype plugin onset grepprg=grep\-nH\$*
"为特定文件类型载入相关缩进文件filetype indent onset nocp

================================================================================================================