Skip to content

Instantly share code, notes, and snippets.

@hugozap
Forked from derfarg/gist:2897501
Created June 22, 2018 02:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hugozap/d3fd58e5a5a641bb57b0ff0cf0635fe9 to your computer and use it in GitHub Desktop.
Save hugozap/d3fd58e5a5a641bb57b0ff0cf0635fe9 to your computer and use it in GitHub Desktop.
Ctags On OSX
Snow Leo ships with ctags not suitable for Ruby development. Ie if you try to generate tags recursively, it will error out:
$ ctags -R
ctags: illegal option -- R
usage: ctags [-BFadtuwvx] [-f tagsfile] file ...
$ which ctags
/usr/bin/ctags
homebrew to the rescue:
$ brew install ctags
==> Downloading http://downloads.sourceforge.net/ctags/ctags-5.8.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/ctags/5.8 --enable-macro-patterns --mandir=/usr/local/Cellar/ctags/5.8/share/man --with-readlib
==> make install
/usr/local/Cellar/ctags/5.8: 6 files, 392K, built in 12 seconds
Now we need to alias ctags to use new version:
$ alias ctags="`brew --prefix`/bin/ctags"
And now back to coding:
$ ctags -R
ctags: Warning: ignoring null tag in public/audio/audio-player.js
Dont forget to save ctags alias, ie like this:
$ alias ctags >> ~/.bashrc
And yes, homebrew rocks!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment