zengsun的部落歌 » 日志 » 我的vim设置
我的vim设置
py.live 发表于 2007-03-21 22:52:07
set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 普通设置
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 使用颜色方案
colo darkblue
" GUI字体
set guifont=NSimSun\ 12
" 设定文件浏览器目录为当前目录
set bsdir=buffer
set autochdir
" 设置文件编码
set fenc=utf-8
" 设置文件编码检测类型及支持格式
set fencs=ucs-bom,utf-8,gb18030,gbk,gb2312,cp936
"显示行号
set nu!
" 查找结果高亮度显示
set hlsearch
" tab宽度
set tabstop=4
set cindent shiftwidth=4
set autoindent shiftwidth=4
" 使用空格替换tab
set expandtab
" 命令行高度
set cmdheight=2
set showcmd
" 中文帮助
if version > 603
set helplang=cn
endif
" 设置状态条显示
set laststatus=2
set statusline=%<%f\ %h%m%r%=%k[%{(&fenc==\"\")?&enc:&fenc}%{(&bomb?\",BOM\":\"\")}]\ %-14.(%l,%c%V%)\ %P
" 允许文件插件
filetype plugin on
filetype indent on
autocmd BufEnter * :syntax sync fromstart
" css omni
if has("autocmd") && exists("+omnifunc")
autocmd Filetype css
\ if &omnifunc == "" |
\ setlocal omnifunc=csscomplete#CompleteCSS |
\ endif
endif
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 普通设置
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 使用颜色方案
colo darkblue
" GUI字体
set guifont=NSimSun\ 12
" 设定文件浏览器目录为当前目录
set bsdir=buffer
set autochdir
" 设置文件编码
set fenc=utf-8
" 设置文件编码检测类型及支持格式
set fencs=ucs-bom,utf-8,gb18030,gbk,gb2312,cp936
"显示行号
set nu!
" 查找结果高亮度显示
set hlsearch
" tab宽度
set tabstop=4
set cindent shiftwidth=4
set autoindent shiftwidth=4
" 使用空格替换tab
set expandtab
" 命令行高度
set cmdheight=2
set showcmd
" 中文帮助
if version > 603
set helplang=cn
endif
" 设置状态条显示
set laststatus=2
set statusline=%<%f\ %h%m%r%=%k[%{(&fenc==\"\")?&enc:&fenc}%{(&bomb?\",BOM\":\"\")}]\ %-14.(%l,%c%V%)\ %P
" 允许文件插件
filetype plugin on
filetype indent on
autocmd BufEnter * :syntax sync fromstart
" css omni
if has("autocmd") && exists("+omnifunc")
autocmd Filetype css
\ if &omnifunc == "" |
\ setlocal omnifunc=csscomplete#CompleteCSS |
\ endif
endif
相关日志:
收藏:
QQ书签
del.icio.us
订阅:
Google
抓虾
