Muno
Muno

Reputation: 585

Exuberant Ctags for python produces too few tags

Please consider the following MWE:

myGlob = 1

def countMe():
    for i in range(10):
            print(i)

def countMeAgain():
    for i in range(10):
            print(i)

if __name__ == "__main__":
    countMe()
    countMeAgain()
    myGlob = 2

Problem: When I run ctags abc.py, which creates a file called tag, and thereafter open tag, I just see:

print   abc.py  /^            print(i)$/

I was expecting to see tags for countMe, countMeAgain and myGlob. Why does this take place?

What have I tried: I am using OSX + vim. I installed exuberant ctags using homebrew. OSX has a limited version of ctags by default. Thus, if /private/etc/paths gives higher precedence to /usr/bin than /usr/local/bin (the latter houses the version of ctags obtained from homebrew), then running ctags abc.py will use the default version of ctags instead of the homebrew-installed version. I have verified that I am not committing this error.

I learned of this potential error from Exuberant Ctags on Mac and https://gist.github.com/Overbryd/1669348


Cheers

Upvotes: 1

Views: 1346

Answers (1)

Muno
Muno

Reputation: 585

I solved my problem:

exuberant-ctags is no longer being maintained by its original developer. A new repository is being developed.

I uninstalled my old ctags installation. I then installed from this repository using brew:

https://github.com/universal-ctags/ctags

See also ctags, vim and python code

Upvotes: 1

Related Questions