The appending $(rvm gemdir)/gems will including Rails build-in
method(or class/module) definitions, it’s very useful to browse Rails
Formerly, I use the Emacs build-in find-tag command which bounding
to M-. to find the tags. It works, but what annoy me is that
everytime I find-tag, it prompt to choose a tag, even the first
one always what I want. So I write a command to take the place of
It seems that things goes well. But I found that If a method defined
in many places. find-tag only jump to one of them, and without any
prompt. This misguide me occasionally.
After some google search, I found a package
Etags-Select provides a
feature to find tag from multiple tag files, and if there are multiple
matching tags, it will open a selection window for you to choose the
one you want.
Sounds great! eh?
After give it a try, I found it’s not that perfect(not perfect for
ruby code at least). It can’t jump to the definition of a method whose
name ending with a question mark! e.g. signed_in?. After a wandering
around the source code of Etags-Select, I decide to ‘fix’ it by
myself. And finally, I made it! Yeah!
It’s showtime ;)
Firstly, git clone my forked
Etags-Select version and add
it to your Emacs load-path, you may also need to install
;;; Installation of Etags-select
(add-to-list 'load-path "/path/to/my-etags-select")(require 'etags-select)
Secondly, add following snippets to your emacs dotfile.