views:

125

answers:

1

Hi,

i have installed vim 7.2 and ctags 5.8 and created the tags file with "ctags -R /foopath".

I have many methods that are called with the same name in several classes, so if i put the cursor in a function calling and i execute ":tag" it shows the first of the tags listed. If the i execute ":tn" several times i finally find the method..

So my question is: is there any way to show directly the path where is the class that contains the right method im calling?

Regards

Javi

+1  A: 

:tselect tagname will give you a list of matching tags, and you can enter the number of the tag you want.

:stselect tagname will split the window first.

You can also put the cursor on a word and enter g] to get a list of tags matching that word.

<CTRL-W>] will split the window and go to the first tag matching the word under the cursor.

<CTRL-W>g] will split the window and give you the list of matches.

Dave Kirby
Thanks Dave, but i think you didn't understand me or maybe i didn't explain right.Let see: imagine i have tagged several classes (class1, class2, class3, etc) that have the method foo().If i have this code:$class3_object = new class3();class3_object->foo();I'd like to go _directly_ to the tag corresponding to the class3, because it is the class of the object "class3_object".Javi