\在处理未保存或只读文件的时候,弹出确认 set confirm \带有如下符号的单词不要被换行分割
set iskeyword+=_,$,@,%,#,-
\和 wm的设置
\命令模式输入wm打开Tlist和WM set showcmd
\插件的设置
let g:Tlist_Use_Right_Window=1 let g:Tlist_Show_One_File=1 let g:Tlist_Compact_Format=1 let Tlist_Exit_OnlyWindow=1
let g:winManagerWindowLayout='FileExplorer|TagList'
\的设置 let g:treeExplVertical=1 let g:treeExplWinSize=30
\打开以后最大化
\
\光标在窗口上下边界时距离边界7行即开始滚屏 set so=7
\配色
\if !exists(\
\
if has(\
set guioptions-=T \隐藏工具栏 set guioptions-=m set guioptions-=L set guioptions-=r color blackboard
\
\ set guifont=Monaco\\ 13 \中文字体
set guifontset=Microsoft\\ YaHei\\ 13
\对于html,xml文件,通过ctrl+_来closetag if has(\ autocmd FileType
text,xml,html,perl,shell,bash,python,vim,php,ruby color blackboard autocmd FileType xml,html vmap
autocmd FileType java,c,cpp,cs color desertEx autocmd FileType html,text,php,vim,c,java,xml,bash,shell,perl,python setlocal textwidth=100
autocmd Filetype html,xml,xsl source ~/.vim/plugin/closetag.vim endif \ else
color desert
\
\对于html,xml文件,通过ctrl+_来closetag if has(\ autocmd FileType xml,html vmap
autocmd Filetype html,xml,xsl source ~/.vim/plugin/closetag.vim endif \ endif \
endif \\这个是依赖终端的 \
\显示行号 set number
\语法高亮度显示 syntax on
\检测文件的类型 开启codesnip filetype on
filetype plugin on filetype indent on
set completeopt=longest,menu
set runtimepath+=~/.vim/textmateOnly set runtimepath+=/home/hunch/.vim/after so ~/.vim/plugin/supertab.vim
let g:SuperTabDefaultCompletionType=\
\鼠标支持
if has('mouse')
set mouse=a endif
\缩进相关
\继承前一行的缩进方式,特别适用于多行注释 \
\为C程序提供自动缩进 \
\使用C样式的缩进 set cindent
function! GnuIndent()
setlocal cinoptions=>4,n-2,{2,^-2,:2,=2,g0,h2,p5,t0,+2,(0,u0,w1,m1 setlocal shiftwidth=2 setlocal tabstop=8 endfunction au FileType c,cpp setlocal cinoptions=:0,g0,(0,w1 shiftwidth=4 tabstop=4 softtabstop=4
au FileType diff setlocal shiftwidth=4 tabstop=4 au FileType html setlocal autoindent indentexpr= au FileType changelog setlocal textwidth=76
\
au BufEnter /usr/include/c++/* setf cpp au BufEnter /usr/include/g++-3/* setf cpp
\au BufEnter /usr/* call GnuIndent()
function! RemoveTrailingSpace()
if $VIM_HATE_SPACE_ERRORS != '0' &&
\\(&filetype == 'c' || &filetype == 'cpp' || &filetype == 'vim') normal m`
silent! :%s/\\s\\+$//e normal `` endif
endfunction
\
au BufWritePre * call RemoveTrailingSpace()
if &term==\ set t_Co=8
Linux-ubuntu中.vimrc配置



