如何在VIM标签搜索和导航中前进?

Sri*_*nth 8 vim code-navigation

Ctrl +]是跳转到定义.Ctrl + T将返回.Ctrl + T的反义词是什么?

小智 8

:help tag-stack


:[count]po[p][!]        Jump to [count] older entry in tag stack (default 1). 
                        See |tag-!| for [!].  {not in Vi}                     

:[count]ta[g][!]        Jump to [count] newer entry in tag stack (default 1). 
                        See |tag-!| for [!].  {not in Vi}                     
Run Code Online (Sandbox Code Playgroud)

您还可以使用ctrl + ictrl + o分别通过跳转列表向前和向后移动.这适用于标记命令,因为它们被视为跳跃运动.

所以:跳转到标签 ctrl + ]

跳回来: ctr + o

再跳到标签 ctrl + i

:help jump-motions


Dav*_*rby 6

:tag命令将使您沿着标记栈移动.它不受键组合的约束,但您可以在.vimrc文件中自己映射.