my vimrc

来源:互联网 发布:r统计软件 编辑:程序博客网 时间:2024/05/21 17:23
execute pathogen#infect()
filetype on
:set tags=/home/lchen/workspace/kvm/ubuntu-kernel/tags


nmap <C-@>s :cs find s <C-R>=expand("<cword>")<CR><CR>
nmap <C-@>g :cs find g <C-R>=expand("<cword>")<CR><CR>
nmap <C-@>c :cs find c <C-R>=expand("<cword>")<CR><CR>
nmap <C-@>t :cs find t <C-R>=expand("<cword>")<CR><CR>
nmap <C-@>e :cs find e <C-R>=expand("<cword>")<CR><CR>
nmap <C-@>f :cs find f <C-R>=expand("<cfile>")<CR><CR>
nmap <C-@>i :cs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
nmap <C-@>d :cs find d <C-R>=expand("<cword>")<CR><CR>


nmap <F5>   :tabnew<CR>
nmap <F6>   :TlistOpen<CR>
nmap <F7>   :TrinityToggleAll<CR>
nmap <F8>   :TrinityToggleTagList<CR>
nmap <F9>   :NERDTreeToggle<CR>
nmap <F10>  :TrinityToggleSourceExplorer<CR>
" Open and close the taglist.vim separately 
" Open and close the NERD_tree.vim separately 
nmap <C-p> :tabprevious<CR>
nmap <C-n> :tabnext<CR>


function! LoadCscope()
  let db = findfile("cscope.out", ".;")
  if (!empty(db))
    let path = strpart(db, 0, match(db, "/cscope.out$"))
    set nocscopeverbose " suppress 'duplicate connection' error
    exe "cs add " . db . " " . path
    set cscopeverbose
  endif
endfunction
au BufEnter /* call LoadCscope()


let g:NERDTreeDirArrows = 1
let g:NERDTreeDirArrowExpandable = '▸'
let g:NERDTreeDirArrowCollapsible = '▾'
0 0
原创粉丝点击