July 12, 2010

Fix 'Taglist: Failed to generate tags' in Vim

When open taglist in vim, it may says:

Taglist: Failed to generate tags for /my/path/to/file

ctags: illegal option – -^@usage: ctags [-BFadtuwvx] [-f tagsfile] file …

Solution is quite easy, open .vimrc and add the following line

let Tlist_Ctags_Cmd='/location/ctags'

In my mbp, Snow Leopard, it is /opt/local/var/macports/software/ctags/5.8_0/opt/local/bin/ctags