Bryan Says...

Rants, opinions, and other stuff I find interesting.

Creating ctags with git hooks

If you are as lazy or forgetful as I am, you won’t remember to recreate your ctags files. Now you don’t have to. Have your ctags automatically generated when committing, merging, or branching.


Creating ctags with git from Bryan Liles on Vimeo.

I originally saw this code here, and Tobias was kind enough to let me repost it here and make a video of it.

If you like these kind of videos let me know.

Update

To get this to work, you must have exuberant ctags installed. The bsd version uses different command line options. I encourage you to try installing it using macports.

  • tcrawley

    Bryan:

    Nice job! I just realized that we have the same WP theme – makes us appear to be in cohoots.

  • http://davidbolton.net Dave Bolton

    I've been very much enjoying your videos Bryan, keep it going!

    Cheers,
    Dave

  • http://blog.teksol.info/ François Beausoleil

    Bryan, this is very good. The stock ctags on Mac OS 10.5 doesn't recognize the -L and -e options though. I had to install the ctags port. After that, I was able to run run_tags. Thank you very much, and please keep these Vim videos coming!

  • http://smartic.us bryanl

    Yes, this is important. You must install exuberant ctags from macports. I'm not too familiar with the bsd version.

  • Pingback: ideas.each &:post » Generating a TAGS file from a git hook

  • http://blog.tobiascrawley.net Tobias Crawley

    Bryan:

    I just updated the run_tags script to run the find | ctags in the background to make git commands more responsive on larger code bases. The updated version is at http://gist.github.com/42308.