我的vimrc配置
时间:2010-03-28 来源:wmpotato
" ==============================================
" mentainer: WangMinglong <[email protected]> QQ:1018290018
" ==============================================
"================================ " General settings "================================
set nocp "set nocompatible with vi set nobackup "i" set lbr set hls "highlight search set selection=inclusive "i" set showcmd set showmatch set smartcase set autowrite set hidden set mouse=a set co=85 set lines=26
" set the browser's dir as the current directory set bsdir=buffer set autochdir
" Uncomment the following to have Vim load indentation rules and plugins " according to the detected filetype if has("autocmd") filetype plugin indent on endif
filetype on
set nu set cmdheight=2 set linespace=0 set wildmenu
"=================================== " tab indent "=================================== set sw=4 "shiftwidth=4 set ts=4 "tabstop=4 set et "expandtab set smarttab "smarttab
"=================================== " color and font "=================================== if has("gui_running") color manuscript "set guifont=Monaco\ 11 set gfw=文泉驿等宽微米黑\ 11 else color ron
endif
"================================= " encoding and fileencodings "================================= set encoding=utf-8 set fileencodings=utf-8,ucs-bom,gb18030,gbk,cp936
"================================= " Toggle Menu and Toolbar "================================= set guioptions-=m set guioptions-=T map <silent> <F2> :if &guioptions =~# 'T' <Bar> \set guioptions-=T <Bar> \set guioptions-=m <Bar> \else <Bar> \set guioptions+=T <Bar> \set guioptions+=m <Bar> \endif<CR>
"================================= " set wrap "================================= if has("gui_running") set nowrap set go+=b set tw=78 set fo+=mB else set wrap endif
"================================== " Plugin settings " 这里的所有东西都是参照滇狐兄的, " 在这里对他表示感谢 "==================================
" WinManager let g:winManagerWindowLayout="FileExplorer"
" Tlist let Tlist_Use_Rigt_Window=1 let Tlist_File_Fold_Auto_Close=1
" Viki let g:vikiNameSuffix=".viki" augr viki au! au BufRead,BufNewFile *.viki set filetype=viki augr END
"================================ " Functions " 这里的东西也是抄滇狐的 "================================
function TextWork() set nocin set nosm set noai set tw=78 set sw=8 set ts=8 set nowrap endfunction
function NoTextWork() set cin set sm set ai set tw=0 set sw=4 set ts=4 if (!has("gui_running")) set wrap endif endfunction
function CodeWork() call NoTextWork() WManager Tlist endfunction
"=============================== " Commands "===============================
command -nargs=0 TextWork call TextWork() command -nargs=0 NoTextWork call NoTextWork() command -nargs=0 CodeWork call CodeWork()
/////////////////////////////////////////////////////////////////////////////////////////////////////// 由于没什么时间,而且没有迫切需要用vim的必要,所以就没搞得很复杂,下面 的函数部分我还不懂,等有时间的时候再上网查查教程吧。
--昨天重装了ubuntu10.04,今天配置了一天。累啊,我的机械原理和材料力学 作业啊.... --
"================================ " General settings "================================
set nocp "set nocompatible with vi set nobackup "i" set lbr set hls "highlight search set selection=inclusive "i" set showcmd set showmatch set smartcase set autowrite set hidden set mouse=a set co=85 set lines=26
" set the browser's dir as the current directory set bsdir=buffer set autochdir
" Uncomment the following to have Vim load indentation rules and plugins " according to the detected filetype if has("autocmd") filetype plugin indent on endif
filetype on
set nu set cmdheight=2 set linespace=0 set wildmenu
"=================================== " tab indent "=================================== set sw=4 "shiftwidth=4 set ts=4 "tabstop=4 set et "expandtab set smarttab "smarttab
"=================================== " color and font "=================================== if has("gui_running") color manuscript "set guifont=Monaco\ 11 set gfw=文泉驿等宽微米黑\ 11 else color ron
endif
"================================= " encoding and fileencodings "================================= set encoding=utf-8 set fileencodings=utf-8,ucs-bom,gb18030,gbk,cp936
"================================= " Toggle Menu and Toolbar "================================= set guioptions-=m set guioptions-=T map <silent> <F2> :if &guioptions =~# 'T' <Bar> \set guioptions-=T <Bar> \set guioptions-=m <Bar> \else <Bar> \set guioptions+=T <Bar> \set guioptions+=m <Bar> \endif<CR>
"================================= " set wrap "================================= if has("gui_running") set nowrap set go+=b set tw=78 set fo+=mB else set wrap endif
"================================== " Plugin settings " 这里的所有东西都是参照滇狐兄的, " 在这里对他表示感谢 "==================================
" WinManager let g:winManagerWindowLayout="FileExplorer"
" Tlist let Tlist_Use_Rigt_Window=1 let Tlist_File_Fold_Auto_Close=1
" Viki let g:vikiNameSuffix=".viki" augr viki au! au BufRead,BufNewFile *.viki set filetype=viki augr END
"================================ " Functions " 这里的东西也是抄滇狐的 "================================
function TextWork() set nocin set nosm set noai set tw=78 set sw=8 set ts=8 set nowrap endfunction
function NoTextWork() set cin set sm set ai set tw=0 set sw=4 set ts=4 if (!has("gui_running")) set wrap endif endfunction
function CodeWork() call NoTextWork() WManager Tlist endfunction
"=============================== " Commands "===============================
command -nargs=0 TextWork call TextWork() command -nargs=0 NoTextWork call NoTextWork() command -nargs=0 CodeWork call CodeWork()
/////////////////////////////////////////////////////////////////////////////////////////////////////// 由于没什么时间,而且没有迫切需要用vim的必要,所以就没搞得很复杂,下面 的函数部分我还不懂,等有时间的时候再上网查查教程吧。
--昨天重装了ubuntu10.04,今天配置了一天。累啊,我的机械原理和材料力学 作业啊.... --
相关阅读 更多 +
排行榜 更多 +