tags:

views:

116

answers:

1

I have a function name called setValue, used in many classes. Also, i have a global function by the same name. When i press C-], it goes to arbitrary setValue function. How do i directly jump to the global setValue function? It is really pain to use tnext every time to find if the function global.

+2  A: 

When C-] returns multiple matches you can look up the list with

:ts

Then enter the number to jump to correct definition or dismiss the list.


When ctags does not help ... You can search for occurances of setValue and then jump to the one that looks like definition.

:vim /setValue/ *                 <-- greps for setValue in all files

You can search only specific files, if you know that it is in header in subdirectory src or headers:

:vim /setValue/ src/*.h headers/*.h

once it's done do

:cope

to open a list, you can navigate up/down to select the definition that looks correct then jump to it with <enter>

You can close the list with

:clo

And later reopen it with

:cope

It will be there unless you have executed other commands that overwrite the list

stefanB
Thanks a lot, Stefan
chappar