Search code examples
ruby-on-railsrubyvimemacsctags

Generating a better ctags file for Rails projects


How can I generate a good ctags file for a rails project ? One that includes all the gems, ruby libs and sorts them in the right order (like when you search for “Rails” it doesn’t go to the airbrake gem or whatever)

I'm using this right now, but I don't like it for the reason mentioned above:

ctags --tag-relative -Rf.git/tags.$$ --exclude=.git --exclude=*.html --exclude=tmp --exclude=public --exclude=app/assets --languages=-javascript,js,sql,html `bundle show --paths` $MY_RUBY_HOME .

Solution

  • So it turns out the better option (better than ctags) is either Robe for Emacs or a combination of vim + tmux + vmux + pry (to get show-source and edit).

    irb-config is an interesting example of vim setup.