Opening (c)tags in new tab in (G)Vim

vim

Ctrl+w Ctrl+i and :stj is nice, but how do I jump to a tag (under the cursor) in a new tab in GVim/Vim?

Best Answer

Similar question How to use multiple tabs when tagging to a function in Vim

It points out this wiki (which points back at stackoverflow) with these settings (seems to work ok in terminal, haven't tried gvim):

"--------------------
" Function: Open tag under cursor in new tab
" Source:   https://stackoverflow.com/questions/563616/vimctags-tips-and-tricks
"--------------------
map <C-\> :tab split<CR>:exec("tag ".expand("<cword>"))<CR>
"--------------------
" Function: Remap keys to make it more similar to firefox tab functionality
" Purpose:  Because I am familiar with firefox tab functionality
"--------------------
map     <C-T>       :tabnew<CR>
map     <C-N>       :!gvim &<CR><CR>
map     <C-W>       :confirm bdelete<CR>