开发者

How to move forward in VIM Tag Searching and Navigation?

Ctrl + ] is to jump to the definition. Ctrl + T is to 开发者_C百科go back. What's the opposite of Ctrl + T?


: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}                     

You can also use ctrl + i and ctrl + o to move forwards and backwards respectively through the jump list. This works with tag commands since they count as jump movements.

So: jump to a tag ctrl + ]

jump back: ctr + o

jump to tag again ctrl + i

:help jump-motions


The :tag command will move you down the tag stack. It is not bound to a key combination, but you could map it yourself in your .vimrc file.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜