Reputation: 43939
Whenever I am trying to open a file in my Rails project using macVim. I am getting an error
Taglist: Failed to generate tags for .......
But it works perfectly in terminal vim. Why is this happening? I am a beginner and just installed everything using this dotvim repo.
I installed ctags using these commands that I got from this Gist:
$ ctags -R --exclude=.git --exclude=log *
ctags: illegal option -- R
usage: ctags [-BFadtuwvx] [-f tagsfile] file ...
#you need to get new ctags, i recommend homebrew but anything will work
$ brew install ctags
#alias ctags if you used homebrew
$ alias ctags="`brew --prefix`/bin/ctags"
#try again!
ctags -R --exclude=.git --exclude=log *
which ctags
on terminal returning, same if I do from vim or gvim using !
(bang):
/usr/bin/ctags
Upvotes: 3
Views: 2103
Reputation: 749
Or you can just set a variable like
let g:Tlist_Ctags_Cmd='/usr/local/bin/ctags' " Proper ctags location
in your .vimrc file.
Upvotes: 2
Reputation: 30453
You need to change the PATH
order to make /usr/local/bin/ctags
ahead of of /usr/bin/ctags
. The way I prefer to achieve this is by add /usr/local/bin
to the beginning of /etc/paths
:
# for homebrew
/usr/local/bin
# original order
/usr/bin
/bin
/usr/sbin
/sbin
#/usr/local/bin
Upvotes: 7