backup my vimrc

Posted on 三月 3, 2009. Filed under: Linux | 標籤:, |


" 256 color depth
set t_Co=256

" paste without indent
set paste

" 顯示行號
set nu

set nobackup

set autoindent

colors asmdev

set cindent

set ruler

set tags=./tags,tags

set nocompatible

set backspace=2

set showmatch

" tab for cindent with 4 spaces
set shiftwidth=4
" tab = 4 spaces
set tabstop=4
" convert tab to space
set expandtab

syntax on

set et
" set noet

" F2 : 存檔(不關閉)
map :up
" F3 : 切換游標所在行劃底線
map :set cursorline!:echo "Highlight active cursor line: " . strpart("OffOn", 3 * &cursorline, 3)
" F4 直接關閉
map :q
" F5 到下個tab
map :tabprev
" F6 到前個tab
map :tabnext
map :NERDTree
map :set hls!set hls?
nmap :set nu!
imap :set nu!
map :TlistToggle
map :color relaxedgreen
map :vs:Explore
let Tlist_GainFocus_On_ToggleOpen = 1

map w :tabclose
map n :tabnew:e

" 每次開啟檔案回到之前開啟的位置
if has("autocmd")
autocmd BufRead *.txt set tw=78
autocmd BufReadPost *
\ if line("'\"") > 0 && line ("'\"") 0
set fileencodings=ucs-bom,utf-8,cp936,big5,euc-jp,euc-kr,latin1
else
set fileencodings=cp936,big5,euc-jp,euc-kr,latin1
endif

" CJK environment detection and corresponding setting
if v:lang =~ "^zh_CN"
" Use cp936 to support GBK, euc-cn == gb2312
set encoding=cp936
set termencoding=cp936
set fileencoding=cp936
elseif v:lang =~ "^zh_TW"
" cp950, big5 or euc-tw
" Are they equal to each other?
set encoding=big5
set termencoding=big5
set fileencoding=big5
elseif v:lang =~ "^ko"
" Copied from someone縮 dotfile, untested
set encoding=euc-kr
set termencoding=euc-kr
set fileencoding=euc-kr
elseif v:lang =~ "^ja_JP"
" Copied from someone縮 dotfile, unteste
set encoding=euc-jp
set termencoding=euc-jp
set fileencoding=euc-jp
endif
" Detect UTF-8 locale, and replace CJK setting if needed
if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
set encoding=utf-8
set termencoding=utf-8
set fileencoding=utf-8
endif
else
echoerr "Sorry, this version of (g)vim was not compiled with multi_byte"
endif

" cscope
if has("cscope")
set csprg=/usr/bin/cscope
set csto=0
set cst
set nocsverb
" add any database in current directory
if filereadable("cscope.out")
cs add cscope.out
" else add database pointed to by environment
elseif $CSCOPE_DB != ""
cs add $CSCOPE_DB
endif
set csverb
set cscopetag
set cscopequickfix=s-,g-,c-,d-,t-,e-,f-,i-
endif

廣告
繼續閱讀 | Make a Comment ( None so far )

Liked it here?
Why not try sites on the blogroll...