2011年1月11日 星期二

[Vim] .vimrc

筆記一下我目前在用的.vimrc

"=== basic ==="
filetype plugin on        "plugin enable
filetype indent on        "auto indent

"=== encoding ==="
set encoding=utf-8        "enc
set fileencodings=utf-8,gbk,big5,cp950,gb18030,gb2312   "fenc
set termencoding=utf-8    "tenc

"=== editing ==="
syntax on
set nocompatible
set backspace=indent,eol,start
set shiftwidth=2
set tabstop=2
set softtabstop=2
set expandtab
set ic                    "ignorecase
set ru                    "position
set nu                    "line number
set hls                   "hlsearch
set confirm
set wrapscan
set history=1000
set laststatus=2
set statusline=%4*%<\%m%<[%f\%r%h%w]\ [%{&ff},%{&fileencoding},%Y]%=\[Position=%l,%v,%p%%]

"=== buffer ==="
set clipboard+=unnamed

"=== color scheme ==="
set t_Co=256
colorscheme blackbeauty   "for java
colorscheme leo           "for c/c++

"=== vim ==="
autocmd FileType java runtime! autoload/javacomplete.vim
autocmd Filetype java setlocal omnifunc=javacomplete#Complete
autocmd Filetype java set completefunc=javacomplete#CompleteParamsInf
inoremap   
inoremap   

"=== tab ==="
nmap tc :tabnew
nmap te :tabedit
nmap tm :tabmove
nmap tk :tabclose

"=== folding ==="
set foldenable
set foldlevel=10000

沒有留言: