Aug 23, 2012 - mac, vim    No Comments

Ctags on Mountain Lion

这两天vim里需要用到taglist,于是开始装ctags,用homebrew安装很简单

$ brew install ctags


装完后发现生成tags有报错

$ ctags -R
ctags: illegal option -- R
usage: ctags [-BFadtuwvx] [-f tagsfile] file ...


在网上搜了一下,解决方法如下:
1. 先看一下ctags装在哪了

$ which ctags
/usr/bin/ctags

2. 让别名的ctags使用新的版本:

$ alias ctags="`brew --prefix`/bin/ctags"

3. 不要忘记保存ctags的别名

$ alias ctags >> ~/.bashrc

现在可以去生成 tags了

$ ctags -R

Got anything to say? Go ahead and leave a comment!