Monthly Archives: April 2015

Git hooks, ctags & Rails

Small adjustment to Tim Pope’s outstanding Effortless Ctags with Git:

To get ctags to also index all bundled gems (including Rails), make the following change to the ctags hook

Replace

git ls-files | \
  ctags --tag-relative -L - -f"$dir/$$.tags" --languages=-javascript,sql

with

ctags --recurse --tag-relative -f"$dir/$$.tags" --languages=-javascript,sql `bundle show --paths` `git ls-files`

After triggering the hook, the tags file takes a few seconds to generate in the background – have patience 🙂

Advertisements