rinari icon indicating copy to clipboard operation
rinari copied to clipboard

rinari-find-by-context does nothing

Open paulogeyer opened this issue 13 years ago • 7 comments

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

paulogeyer avatar Nov 01 '12 20:11 paulogeyer

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

purcell avatar Nov 02 '12 08:11 purcell

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.

chalmagean avatar Mar 14 '13 10:03 chalmagean

I'm thinking it should probably just be removed.

purcell avatar Mar 14 '13 11:03 purcell

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

chalmagean avatar Mar 14 '13 11:03 chalmagean

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

purcell avatar Mar 14 '13 11:03 purcell

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

chalmagean avatar Mar 14 '13 12:03 chalmagean

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

asok avatar Mar 15 '13 14:03 asok