vim配置(~/.vimrc)

 

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" script local variable
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
let s:link = $HOME . "/work/link"

"s:tags : tags search path ---- link to the directory of tags must be under s:link/tags
let s:tagsp = s:link . "/tags"
let s:tags = s:tagsp . "/*/tags"

"s:include : include search path    ---- link to inlucde must be under s:link/include
let s:incp = s:link . "/include"
let s:incps = [s:incp."/*" , s:incp."/*/*", s:incp."/*/*/*"]
let s:include = ""
for inc in s:incps
    if s:include == ""
        let s:include = inc 
    else
        let s:include = s:include . "," . inc 
    endif
endfor

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" built-in setup
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" tab
set shiftwidth=4
set softtabstop=4
set tabstop=4
set expandtab

" indent
filetype plugin on
set smartindent

" misc
"set updatetime=10000
set number

" tags
let &tags   =   &tags . "," . s:tags                " tags path
let &path   =   &path . "," . s:include             " search path (include)

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" plug-in setup
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" taglist
let Tlist_Auto_Update = 0                   " Automatically update the taglist to include newly edited files.
let Tlist_Show_One_File = 1                 " Show tags for the current buffer only.
let Tlist_Exit_OnlyWindow = 1               " Close Vim if the taglist is the only window 
nnoremap <silent> TT :TlistToggle<CR>
nnoremap <silent> TH :TlistHighlightTag<CR>
nnoremap <silent> TU :TlistUpdate<CR>



 


你可能感兴趣的:(vim配置(~/.vimrc))