eschulte / rinari

Rinari Is Not A Rails IDE (it is an Emacs minor mode for Rails)
http://rinari.rubyforge.org
GNU General Public License v3.0
412 stars 68 forks source link

rinari-find-by-context does nothing #45

Open paulogeyer opened 11 years ago

paulogeyer commented 11 years ago

Hi,

I don't know if I am missing something, but rinari-find-by-conext doesn't work

I've installed it from the emacs package.el, and looks like I'm using the newest version, my emacs version is 24-snapshot

purcell commented 11 years ago

Can you please provide a snippet of the view code in which you are executing the command, with an indication of where you cursor is when you do so?

-Steve

chalmagean commented 11 years ago

I'd second this.

Example:

In controllers: If you're on a model name, it does nothing. If you're on a layout name it does nothing.

In the view: If you're on a render line, it does nothing.

I don't really know what this function was designed to do.

purcell commented 11 years ago

I'm thinking it should probably just be removed.

chalmagean commented 11 years ago

Well it would be nice to have something like vim's gf which does find by context and it's very handy.

purcell commented 11 years ago

I assume that's bound to something Rails-specific in that case? Can you point me at the corresponding vimscript?

chalmagean commented 11 years ago

Yes it's from the rails.vim plugin https://github.com/tpope/vim-rails (which is awesome).

asok commented 11 years ago

It might be dump at start. So if we are in the line with a word "render" look for partial or template. if there is a "belongs_to", "has_one", "has_many" singularize the word under the point and look for a model. Any other case call find-tag with the word under the point as an argument. I have something similar that is a half-buggy code here: https://github.com/asok/arm/blob/master/arm.el#L265