How to teach ctags to read Cheetah template files:
1) Create a file in your home directory, .ctags (i.e. $HOME/.ctags).
2) Edit it:
--langdef=cheetah
--langmap=cheetah:.tmpl
--regex-cheetah=/^#def[ \t]*([a-zA-Z0-9_]+)/\1/d,definition/
(This assumes your Cheetah templates use the extension .tmpl. Change --langmap to suite your needs).
This is for Exuberant Ctags, not the stock one that ships on some systems. If you run ctags --version and it doesn't tell you it's Exuberant Ctags you probably have a different version.
Cheetah is a templating system used in Python programming. I use it at work and yesterday I finally decided to do something about Cheetah template support in my TAGS file (I use Emacs; vim users will use a file called "tags").
Be sure to run ctags again to generate a new tags file; you may need to tweak the command line flags so ctags picks up your template files:
ctags -e -R --languages=-html,python
It's neat that this can be accomplished just through command line flags! I thought about writing an extension or a patch in C, but this small bit of work does pretty much all I need.
