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

本文是很久以前整理的。

将系统由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 the
PATH environment variable, then set this variable to point to the location of
the ctags utility in your system. Note that this variable should point to the
fully qualified exuberant ctags location and NOT to the directory in which
exuberant ctags is installed. If the exuberant ctags tool is not found in
either PATH or in the specified location, then the taglist plugin will not be
loaded. Examples:


        let Tlist_Ctags_Cmd = 'd:\tools\ctags.exe'
        let Tlist_Ctags_Cmd = '/usr/local/bin/ctags'
 
sudo apt-get install exuberant-ctags

你可能感兴趣的:(vim taglist 解决ctags: unrecognized option '--format)