Build tags files for emacs and vim

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
#!/bin/sh
:>TAGS
:>tags
for dir in . /usr/share/pyshared/django; do
  find $dir -name '*.py' | etags -a -
  find $dir -name '*.py' | ctags -a -
  find $dir -name '*.js' | etags -a -
  find $dir -name '*.js' | ctags -a -
  find $dir -name '*.html' | etags -a --regex='/.*{%[ \t]+block[ \t]+\([^ \t%]+\)/\1/' -
  find $dir -name '*.html' | ctags -a --regex='/.*{%[ \t]+block[ \t]+\([^ \t%]+\)/\1/' -
done

More like this

  1. cron/console bootstrap django by nstrite 4 years, 9 months ago
  2. Update ContentTypes and Permissions without syncdb by paltman 4 years, 1 month ago
  3. Command Line Script Launcher by dakrauth 3 years, 10 months ago
  4. Autoload Django Models When Using ./manage.py shell by sheats 4 years, 4 months ago
  5. Make hyperlinks for labels of raw_id_fields (jQuery) by ramen 2 years, 4 months ago

Comments

Scanner (on November 19, 2009):

I do something like that, but instead of hardcoding '.' and '/usr/share/pyshared/django' for every project I am working on I tend to have 'PYTHONPATH' set up so I use this pattern:

for dir in `echo $PYTHONPATH | sed 's/:/ /g'`; do

#

(Forgotten your password?)