Skip to content

Instantly share code, notes, and snippets.

@vitaliel
Created April 10, 2012 10:57
Show Gist options
  • Save vitaliel/2350444 to your computer and use it in GitHub Desktop.
Save vitaliel/2350444 to your computer and use it in GitHub Desktop.
rake task to update TAGS
desc "create TAGS file for emacs, vim"
# sudo apt-get install exuberant-ctags
task :tags do
rm_f "TAGS"
# ctags-exuberant -a -e -f TAGS --tag-relative -R app lib vendor
cmd = RUBY_PLATFORM =~ /darwin/i ? "/usr/local/bin/ctags -e" : "etags"
dirs = %w{app lib test}
dirs << "spec" if test ?d, "spec"
system "#{cmd} -R #{dirs.join ' '}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment