"2008年 09月 21日 星期日 01:11:28 CST
" 在处理未保存或只读文件的时候,弹出确认 set confirm " 带有如下符号的单词不要被换行分割
set iskeyword+=_,$,@,%,#,-
"Tlist 和 wm的设置
" 命令模式输入wm打开Tlist和WM
set showcmd
"Taglist插件的设置
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'
"Tree explorer的设置
let g:treeExplVertical=1
let g:treeExplWinSize=30
"gvim打开以后最大化
"au GUIEnter * simalt ~x
"光标在窗口上下边界时距离边界7行即开始滚屏
set so=7
" 配色
" Avoid clearing hilight definition in plugins
if !exists("g:vimrc_loaded")
" color scheme
if has("gui_running")
set guioptions-=T "隐藏工具栏
set guioptions-=m
set guioptions-=L
set guioptions-=r
color blackboard
"colorscheme professional
"set guifont=YaHeiConsolasHybrid\ 13
set guifont=Monaco\ 13
"中文字体
set guifontset=Microsoft\ YaHei\ 13
"对于html,xml文件,通过ctrl+_来closetag
if has("autocmd")
autocmd FileType text,xml,html,perl,shell,bash,python,vim,php,ruby color blackboard
autocmd FileType xml,html vmap <C-o> <ESC>'o'>o-->
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 " has("autocmd")
else
color desert
"colorscheme zellner
"对于html,xml文件,通过ctrl+_来closetag
if has("autocmd")
autocmd FileType xml,html vmap 'o'>o-->
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 " has("autocmd")
endif " has
endif " exists(...)
"这个是依赖终端的
"set background=dark
" 显示行号
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="<C-X><C-O>"
"鼠标支持
if has('mouse')
set mouse=a
endif
"缩进相关
" 继承前一行的缩进方式,特别适用于多行注释
"set autoindent
" 为C程序提供自动缩进
"set smartindent
" 使用C样式的缩进
set cindent
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
" Recognize standard C++ headers
au BufEnter /usr/include/c++/* setf cpp
au BufEnter /usr/include/g++-3/* setf cpp
" Setting for files following the GNU coding standard
au BufEnter /usr
|