Menu

#258 python imports are included

open
nobody
None
5
2009-07-30
2009-07-30
No

Since version 5.8, ctags also shows the import lines along with the function I am looking for.

It adds much noise and doesn't match ctags goal: find the declaration of the object we are interested into.

Example:

# pri kind tag file
1 F C i Editable myproject/gallery.py
from editable import Editable
2 F i Editable myproject/article.py
from editable import Editable
3 F i Editable myproject/shop.py
from editable import Editable
4 F c Editable myproject/editable.py
class Editable(object):
5 F i Editable myproject/product.py
from editable import Editable
6 F i Editable myproject/universe.py
from editable import Editable
Type number and <Enter> (empty cancels):

Here only entry 4 is useful and I should be brought immediately to it.

I have found how to deactivate it but I wanted to show disagreement.

Thanks anyway for this wonderful tool.

Discussion

  • George V. Reilly

    This is a major regression in Python support. 5.7 worked much better.

    Hervé, how do you deactivate it?

     
  • Hervé Cauwelier

    Check the man page. It is well documented how to activate or deactivate global options or options specific to Python. I also learned how to configure ctags without environment variables.

     
  • Gediminas Paulauskas

    This is clearly a regression. Maybe there are some configuration options, but the previous behaviour should be the default. Otherwise, ctags 5.8 is useless for Python.

     
  • Hervé Cauwelier

    For all those who won't read the documentation, here is my "~/.ctags":

    --exclude=Python-*
    --exclude=Zope-*
    --exclude=build
    --exclude=lib
    --exclude=lib64
    --exclude=include
    --exclude=version[0-9]
    --exclude=test*
    --exclude=data
    --exclude=ui
    --python-kinds=-iv

     

Log in to post a comment.