vimcode-navigation

How to move forward in VIM Tag Searching and Navigation?


Ctrl + ] is to jump to the definition. Ctrl + T is to go back. What's the opposite of Ctrl + T?


Solution

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