在 (G)Vim 的新选项卡中打开 (c) 标签 [英] Opening (c)tags in new tab in (G)Vim
本文介绍了在 (G)Vim 的新选项卡中打开 (c) 标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Ctrl+w Ctrl+i 和 :stj 很不错,但是如何在 GVim/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?
推荐答案
它指出了这个wiki (指向stackoverflow) 使用这些设置(似乎在终端中工作正常,还没有尝试过 gvim):
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>
这篇关于在 (G)Vim 的新选项卡中打开 (c) 标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文