简体   繁体   English

vim:标记列表无法生成标记

[英]vim: taglist fails to generate tags

When trying to run taglist ( :TlistToggle ) on a .py file I get the error: 当尝试在.py文件上运行标记列表( :TlistToggle )时,出现错误:

Taglist: Failed to generate tags for /Users/...py
ctags: illegal option -- -^@usage: ctags [-BFatuwvx] [-f tagsfile] file ...^@

I've downloaded the latest taglist and ctags plugins, and ran :let Tlist_Ctags_Cmd = '"/usr/local/bin/ctags"' within vim (I'm on OS X, running vim in the terminal). 我已经下载了最新的标签列表和ctags插件,并在vim中运行:let Tlist_Ctags_Cmd = '"/usr/local/bin/ctags"' (我在OS X上,在终端上运行vim)。

Any thoughts to why I get the above error? 对为什么会出现上述错误有任何想法吗?

Taglist only supports "exuberant ctags tool", not "GNU ctags or the Unix ctags", see the FAQ . 标记列表仅支持“旺盛的ctags工具”,不支持“ GNU ctags或Unix ctags”,请参阅FAQ

I use tagbar instead of it. 我使用标签栏代替它。

You need "exuberant ctags tool" and you can follow following steps to build your own and install. 您需要“旺盛的ctags工具”,并且可以按照以下步骤构建自己的工具并安装。

  1. download crags from http://ctags.sourceforge.net http://ctags.sourceforge.net下载碎片
  2. Extract ctags to a folder ( ex e-ctags ) 将ctag提取到文件夹(ex e-ctags)
  3. Goto that folder ( cd e-crags ) 转到该文件夹​​(cd e-crags)
  4. ./configure 。/配置
  5. ./make 。/使

Once you have the binary you can move it to your bin folder as: 拥有二进制文件后,可以将其移动到bin文件夹中,如下所示:

sudo mv ctags /usr/bin/ctags-exuberant sudo mv ctags / usr / bin / ctags-exuberant

and use ctags-exuberant instead of ctags. 并使用ctags-exuberant代替ctags。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM