Skip to content

Instantly share code, notes, and snippets.

@jeremyjh
Created October 3, 2012 00:24
Show Gist options
  • Save jeremyjh/3824188 to your computer and use it in GitHub Desktop.
Save jeremyjh/3824188 to your computer and use it in GitHub Desktop.
Rebuild CTAGS including only bundled gems and rails project files
desc "Regenerate tags (CTAGS)"
task :ctags do
puts " * Regenerating Tags"
excludes = %w{
.git
.git*
*.yml
app/views
app/assets
coverage
config
test/coverage
spec
lib/tasks
lib/assets
doc
features
public
log
tmp
}
excludes_options = excludes.map{|e| "--exclude=#{e}"}.join(' ')
system("bundle show --paths | xargs ctags -R")
system("ctags -V -a -R #{excludes_options} *")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment