Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Guard gem for generating ctags for project files and gems from project's bundle.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 guard-ctags-bundler.gemspec
README.md

Guard-CTags-Bundler

Guard-CTags-Bundler generates ctags for your project and for gems in your bundle. For project tags file tags is generated, for gems tags file gems.tags is generated.

Features

  • Initially developed for Rails projects, but theoretically can be used with any ruby project, that uses Bundler, with minimal configuration changes.
  • When you run bundle install in your project, gems.tags file is automatically is generated or updated.
  • When you save one of you project's ruby files, tags file is automatically generated or updated.
  • Only Linux is tested, but probably will work on Mac

Install

Make sure you have Guard installed.

Install the gem:

$ gem install guard-ctags-bundler

Add it to your Gemfile (inside development group):

gem 'guard-ctags-bundler'

And then add a basic setup to your Guardfile:

$ guard init ctags-bundler

CTags

Ctags generates an index (or tag) file of language objects found in source files that allows these items to be quickly and easily located by a text editor or other utility. A tag signifies a language object for which an index entry is available (or, alternatively, the index entry created for that object).

In ubuntu you can install ctags by running

$ sudo apt-get install exuberant-ctags

Vim

Vim supports ctags by default. All you need to do is add your gems.tags file to the Vim's tag stack.

set tags+=gems.tags

Emacs

Ctags can be used with emacs too. Add :emacs => true option to your Guardfile and ctags will be generated with -e option:

guard 'ctags-bundler', :emacs => true do
  watch(%r{^(app|lib|spec/support)/.*\.rb$})  { ["app", "lib", "spec/support"] }
  watch('Gemfile.lock')
end

Thanks to Jorge Dias for this patch.

Something went wrong with that request. Please try again.