VIM: How to move between matching tags?
Asked Answered
L

3

5

I'm a big fan of ctags, but sometimes it is hard to use it.

In case when I have a few declaration of the functions with the same name - "ctrl + ]" throws you to the first occurrence - which is not always what I need.

How can I see the full list of matching tags so I can choose which one to open?

Lewiss answered 9/12, 2009 at 22:50 Comment(0)
I
8

Using gCtrl] instead of Ctrl] will show you a list of tags if there is more than one that matches the word under the cursor.

Icj answered 9/12, 2009 at 22:55 Comment(0)
A
5

:ts shows the tags for the last tag requested, or you can give it an argument to search for a specific tag.

Asarum answered 9/12, 2009 at 22:52 Comment(0)
W
2

:[count]tn[ext][!]  Jump to [count] next matching tag (default 1).  See
            |tag-!| for [!].  {not in Vi}

                            *:tp* *:tprevious*
:[count]tp[revious][!]  Jump to [count] previous matching tag (default 1).
            See |tag-!| for [!].  {not in Vi}
Wallaroo answered 10/12, 2009 at 4:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.