读书人

vim taglist 解决ctags: unrecognized

发布时间: 2012-07-02 17:46:22 作者: rapoo

vim taglist 解决ctags: unrecognized option '--format=2'

将系统由fedora换为mint,使用原vim配置文件,使用taglist时候出现以下错误:

Taglist: Failed to generate tags for ....(a file)
ctags: unrecognized option '--format=2'^@^ITry `ctags --help' for a complete list of options.^@

而且无法生成tag(已经安装了ctags、etags).

解决方案:

以下摘自:http://vim-taglist.sourceforge.net/manual.html。

Q. When I try to open the taglist window, I am seeing the following error   message. How do I fix this problem?   Taglist: Failed to generate tags for /my/path/to/file   ctags: illegal option -- -^@usage: ctags [-BFadtuwvx] [-f tagsfile] file ...A. The taglist plugin will work only with the exuberant ctags tool. You   cannot use the GNU ctags or the Unix ctags program with the taglist plugin.   You will see an error message similar to the one shown above, if you try   use a non-exuberant ctags program with Vim. To fix this problem, either add   the exuberant ctags tool location to the PATH environment variable or set   the 'Tlist_Ctags_Cmd' variable.

http://vim-taglist.sourceforge.net/manual.html#%27Tlist_Ctags_Cmd%27

If exuberant ctags is not present in one of the directories specified in thePATH environment variable, then set this variable to point to the location ofthe ctags utility in your system. Note that this variable should point to thefully qualified exuberant ctags location and NOT to the directory in whichexuberant ctags is installed. If the exuberant ctags tool is not found ineither PATH or in the specified location, then the taglist plugin will not beloaded. Examples:        let Tlist_Ctags_Cmd = 'd:\tools\ctags.exe'        let Tlist_Ctags_Cmd = '/usr/local/bin/ctags'

?

sudo apt-get install exuberant-ctags

读书人网 >开源软件

热点推荐