旺盛的 ctags 忽略 python-kinds 选项

Exuberant ctags ignores python-kinds option

我正在尝试为 Python 标准库生成一个 ctags 文件,以便我可以将它添加到我的 Python 项目中以获得正确的 tagging/highlighting 标准库函数.我不想为变量生成标签,因为那样会使标签文件变大,而且我真的只关心函数和 class 名称。但是,Exuberant Ctags 似乎忽略了我所有禁用变量标记的请求,并且仍然生成一个包含大量 kind:v.

条目的标签文件

这就是我 运行 旺盛的 Ctags:

cd /usr/lib/python3.5
sudo chmod o+w .
ctags --languages=python --python-kinds=-vi --tag-relative=yes -f ./tags --recurse --fields=+iaSszt --extra=+q .

(请注意,我暂时将 /usr/lib/python3.5 设置为世界可写,以便 ctags 可以在当前目录中创建标签文件;我正在使用 --tag-relative 因为我想使用此标签带有 Vim 插件 TagHighlight 的文件)。

下面是它生成的标签文件中的一些示例行,表明它无论如何都忽略了我的选项和索引变量:

Array1Glob      test/pystone.py /^Array1Glob = [0]*51$/;"       kind:v
Array2Glob      test/pystone.py /^Array2Glob = [x[:] for x in [Array1Glob]*51]$/;"      kind:v
ArrayProxy      multiprocessing/managers.py     /^ArrayProxy = MakeProxyType('ArrayProxy', ($/;"        kind:v
ArticleInfo     nntplib.py      /^ArticleInfo = collections.namedtuple('ArticleInfo',$/;"       kind:v
...
Attribute       inspect.py      /^Attribute = namedtuple('Attribute', 'name kind defining_class object')$/;"    kind:v
AttributeList   xml/dom/minidom.py      /^AttributeList = NamedNodeMap$/;"      kind:v
AttributesImpl  xml/sax/expatreader.py  /^AttributesImpl = xmlreader.AttributesImpl$/;" kind:v
AttributesImpl  xml/sax/xmlreader.py    /^class AttributesImpl:$/;"     kind:c  inherits:
AttributesNSImpl        xml/sax/expatreader.py  /^AttributesNSImpl = xmlreader.AttributesNSImpl$/;"     kind:v

作为测试,我还尝试创建一个包含“--python-kinds=-vi”的 ~/.ctags 文件,而不是在命令行上传递它,但这没有任何区别。

这是怎么回事?为什么 python-kinds=-vi 被忽略了?

这是a bug of Exuberant Ctag and you can use universal-ctags

此错误已在 universal-ctags 中 fixed