" Last Change: 2008-02-29 09:54:46
set tag=tags;../tags;../../tags;../../../tags;../../../../../tags;../../../../../../tags;../../../../../../../../tags;
set tabstop=4 "when you click TAB,indent 4 character
set softtabstop=4
set shiftwidth=4
set history=200
"Del the bell when you use vim error
set vb t_vb=
set foldmethod=syntax "open fold
set autoindent
set expandtab "use replace
set background=dark "this let comment line more light
set showmatch " let '(','{','[' can auto match by ')','}',']'
set showcmd
set showmode
set nu "show line number at front
set incsearch "when you serach, searching characters which you have entered
set ruler
set laststatus=2 "show status in bottom
set bs=2 "this fix backspace cannot use in vim70
set hlsearch
iab #b /***********************Zeroman add here for test************************
iab #e ************************Zeroman add here for test************************/
iab #o /***********************Zeroman add here for test************************/
iab #d #include "/debug/gcc4_debug.h"
set mouse=a
set dir=/tmp/vim
set backupdir=/tmp/vim/bak
set nobackup
syntax on
set nocp
if version>=600
filetype plugin indent on
endif
if version >= 603
set helplang=cn
endif
"set path =.,/usr/include,./include,./../include,./../../include,./../../../include,./../../../../include,,
set path =.,/usr/local/arm/arm-uclibc/include/,./include,./../include,./../../include,./../../../include,./../../../../include,,
"set encoding=utf-8 " set default encoding as UTF-8
"set fileencodings=ucs-bom,utf-8,cp936,latin1 " fileconding detection order
"set termencoding=utf-8 " support Chinese display in rxvt-unicode
map :w
"map ShowFunc
map :TlistToggle
map :call Do_lint()
map i/* */3hi
map , :<
map . :>
nmap B :call Do_make()
nmap C :cclose
nmap c :close
imap j OB
imap h OD
imap k OA
imap l OC
imap w ebdei
map z 0i//:noh
map x :s/\/\///g
:noh
"auto load cscope.out
if has("cscope")
set csprg=/usr/bin/cscope
set csto=0
set cst
set nocsverb
let n = 1
let s1 = "cscope.out"
let csout = "cscope add "
while n < 4
if filereadable(s1)
let csout = csout . s1
execute csout
unlet csout
unlet n
unlet s1
break
endif
let s1 = "../" . s1
let n = n + 1
endw
set csverb
endif
nmap s :cscope find s =expand("")<CR>
nmap g :cscope find g =expand("")<CR>
nmap d :cscope find d =expand("")<CR> =expand("%")<CR>
nmap c :cscope find c =expand("")<CR>
nmap t :cscope find t =expand("")<CR>
nmap e :cscope find e =expand("")<CR>
nmap f :cscope find f =expand("")<CR>
nmap i :cscope find i ^=expand("")<CR>$
function Do_make()
let target = "make "
execute target
execute "copen"
endfunction
function! Timestamp(comment)
if (a:comment == '')
return
endif
let pattern = '\('.a:comment.' Last Change:\s\+\)\d\{4}-\d\{2}-\d\{2} \d\{2}:\d\{2}:\d\{2}'
let row = search('\%^\_.\{-}\(^\zs' . pattern . '\)', 'n')
let now = strftime('%Y-%m-%d %H:%M:%S', localtime())
if row != 0
let new_row_str =substitute(getline(row), '^' . pattern , '\1', '') . now
call setline(row, new_row_str)
else
normal m'
silent! :1
normal O
let new_row_str = a:comment . " Last Change: " . now
call setline(1, new_row_str)
normal ''
endif
endfunction
"au BufWritePre *vimrc,*.vim call Timestamp('"')
au BufWritePre .exrc call Timestamp('
|