新安装ubuntu11.10后,运行 sudo apt-get install vim
然后配置vim的,使其适合自己的编程风格!
set runtimepath+=~/vimfiles
"set nowrap
set nocompatible
set showcmd
set modelines=5
au GUIEnter * simalt ~x
set guioptions+=t
set guioptions-=T
set so=4
set number
set tabstop=4
set softtabstop=4
"colorscheme ps_color
set nowritebackup
set autoindent
filetype on
filetype plugin on
filetype indent on
filetype plugin indent on
set completeopt=longest,menu
set backspace=indent,eol,start
set foldmethod=syntax
set foldlevel=100
"set list
set listchars=tab:>-,trail:.,extends:>
set suffixes+=.pyc,.pyo
set shiftwidth=4
set showmatch
set ignorecase smartcase
set incsearch
"set cin
set cino=:0,g0,u0,(0,W4
set fileformat=unix
set ruler
"set visualbell
set iskeyword+=.
set laststatus=2
set fo-=at
syntax on
colorscheme desert
"========================================================
" Highlight All Function
"========================================================
syn match cFunction "\<[a-zA-Z_][a-zA-Z_0-9]*\>[^()]*)("me=e-2
syn match cFunction "\<[a-zA-Z_][a-zA-Z_0-9]*\>\s*("me=e-1
hi cFunction gui=NONE guifg=#B5A1FF
"========================================================
" Highlight All Math Operator
"========================================================
" C math operators
syn match cMathOperator display "[-+\*/%=]"
" C pointer operators
syn match cPointerOperator display "->\|\."
" C logical operators - boolean results
syn match cLogicalOperator display "[!<>]=\="
syn match cLogicalOperator display "=="
" C bit operators
syn match cBinaryOperator display "\(&\||\|\^\|<<\|>>\)=\="
syn match cBinaryOperator display "\~"
syn match cBinaryOperatorError display "\~="
" More C logical operators - highlight in preference to binary
syn match cLogicalOperator display "&&\|||"
syn match cLogicalOperatorError display "\(&&\|||\)="
" Math Operator
hi cMathOperator guifg=#3EFFE2
hi cPointerOperator guifg=#3EFFE2
hi cLogicalOperator guifg=#3EFFE2
hi cBinaryOperator guifg=#3EFFE2
hi cBinaryOperatorError guifg=#3EFFE2
hi cLogicalOperator guifg=#3EFFE2
hi cLogicalOperatorError guifg=#3EFFE2
let Tlist_Show_One_File=1
let Tlist_Exit_OnlyWindow=1
let g:winManagerWindowLayout='FileExplorer|TagList'
nmap wm :WMToggle<cr>
set cscopequickfix=s-,c-,d-,i-,t-,e-
filetype plugin indent on
set completeopt=longest,menu
let g:SuperTabRetainCompletionType=2
let g:SuperTabDefaultCompletionType="<C-X><C-O>"
"let g:miniBufExplMapCTabSwitchBufs = 1
"let g:miniBufExplMapWindowNavVim = 1
"let g:miniBufExplMapWindowNavArrows = 1
nnoremap <silent> <F3> :Grep<CR>
set tags=tags;/
source $VIMRUNTIME/ftplugin/man.vim
"set foldmethod=syntax
"set foldlevel=100
ab .m #include <stdio.h><cr>#include <stdlib.h><cr>#include "IO.h"<cr><cr>int main(int argc, char *argv[])<cr>{<cr>return 0;<cr>}<ESC>kO