I'm using macvim/vim for most of my Ruby + Ruby on Rails development. Is there currently a way to jump to where a method was defined within a project, even if it's not in the same file as where it's being invoked? Either a l开发者_开发知识库anguage agnostic way or a Ruby/Rails specific way works.
I recommend using the ctags plugin, Bryan Liles put together a nice screencast on how to use it with rails development.
http://smartic.us/2009/04/05/using-ctags-in-vim/
From his page:
Not-so-complete cheat sheet:
^] – find a tag
^T – go backwards
:tags – show where you’ve been
:tag – go somewhere in your tag stack
:tselect or g] – show where something is referenced
^W-] – find a tag in a split window
You can also have a look at the vim help by running: help :tags
EDIT:
Here is a nice screencast on updating your tags file automatically http://smartic.us/2009/04/03/creating-ctags-with-git-hooks/
精彩评论