Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VIM: How to move between matching tags?

Tags:

vim

ide

ctags

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?

like image 862
Nikita Fedyashev Avatar asked Dec 09 '09 22:12

Nikita Fedyashev


3 Answers

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.

like image 185
jamessan Avatar answered Nov 02 '22 23:11

jamessan


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

like image 20
David Winslow Avatar answered Nov 03 '22 00:11

David Winslow



:[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}
like image 36
Pierre-Antoine LaFayette Avatar answered Nov 03 '22 01:11

Pierre-Antoine LaFayette