diff --git a/.vimrc b/.vimrc index c07cd5a..4fb5d6d 100644 --- a/.vimrc +++ b/.vimrc @@ -11,8 +11,8 @@ " F8 view tag list " S-F8 build ctags/cscope databases " M-F8 build kernel ctags/cscope databases -" F9 build cscope in .vim/cscope -" S-F9 Search cscopeDB in .vim/cscope +" S-F9 build cscope in .vim/cscope +" F9 Search cscopeDB in .vim/cscope " M-F9 diff tool " F10 folding " F11 unhighlight search @@ -218,8 +218,8 @@ else endif if has("cscope") - map :call GetCscopeDb(expand("%:p:h")) - map :call GenerateCscopeDb() + map :call GetCscopeDb(expand("%:p:h")) + map :call GenerateCscopeDb() endif " close preview window after a completion if has("autocmd") @@ -227,6 +227,18 @@ if has("autocmd") autocmd InsertLeave *.{[hc],cpp} if pumvisible() == 0|pclose|endif endif +function! TagInNewTab() + let word = expand("") + redir => tagsfiles + silent execute 'set tags' + redir END + tabe + execute 'setlocal' . strpart(tagsfiles, 2) + execute 'tag ' . word +endfunction + +nmap :call TagInNewTab() + """"""""" " PASTE " """""""""