Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rinari-find-by-context does nothing #45

Open
paulogeyer opened this issue Nov 1, 2012 · 7 comments
Open

rinari-find-by-context does nothing #45

paulogeyer opened this issue Nov 1, 2012 · 7 comments

Comments

@paulogeyer
Copy link

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
Copy link
Collaborator

purcell commented Nov 2, 2012

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
Copy link

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
Copy link
Collaborator

purcell commented Mar 14, 2013

I'm thinking it should probably just be removed.

@chalmagean
Copy link

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

@purcell
Copy link
Collaborator

purcell commented Mar 14, 2013

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

@chalmagean
Copy link

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

@asok
Copy link

asok commented Mar 15, 2013

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants