vimctagscscopeexuberant-ctags

Tag navigation in vim


With cscope integrated Vim, I can navigate back using the ctrl-T and see the current tag stack position using :tags . But how do I go forward in the stack? The only thing I could find from the man pages is to go to the function definition (like ctrl-])


Solution

  • The tag stack is created by all your "jump to definition". Each time you do <C-]>, the tag you jump to is added to the tag stack and you are able to use <C-t> or :pop to jump back to the previous tag in the tag stack or :tag to go the other way. Both :tag and :pop take an optional count so :5pop would go to the fifth previous tag.

    See :help tagstack.