-
-
Notifications
You must be signed in to change notification settings - Fork 379
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
add :Rfactory command for test/factories/**/*.rb #85
Comments
It's possible to define your own custom navigation commands in
I'm really conservative when it comes to supporting plugins in rails.vim. So far, I've caved on RSpec and Cucumber. |
Awesome! Thanks for the snippet (I skimmed the code but didn't see how to define my own |
Since |
For the latest Factory Girl, which uses filenames like {
"test/factories/*.rb": {
"command": "factory",
"affinity": "collection",
"alternate": "app/models/{singular}.rb",
"related": "db/schema.rb#{}",
"test": "test/models/{singular}_test.rb",
"template": "FactoryGirl.define do\n factory :{singular} do\n end\nend",
"keywords": "factory sequence"
}
} Repeat for Update: changed %o to %i. |
And for the old |
You also need to change the glob, and %o to %s. On Mon, Mar 25, 2013 at 1:01 PM, Will Gray notifications@github.com wrote:
|
Is there anything wrong with using an explicit %o or %p in place of %s when appropriate? |
I might add I'm really annoyed that |
Good to know. I assumed Edit: Guess I didn't pay enough attention when I looked at the docs. |
I am changing %o to %i because the |
Thank you! This works as advertised :) (pjg/dotfiles@0c5e560) |
Awesome guys, thank you so much for this. |
Anyone else who comes here in future, Chris Toomey has a plugin for all of us -> https://github.com/christoomey/vim-rfactory |
|
Thanks Tim! 😻 |
any substitute to |
It works right now. |
it looks into |
It looks in both |
yeah, my bad. The problem in my case is that my project factories are called like |
It's a bit clumsy but |
yeah. But can get better with a bit of a vimscript i guess :) |
Tab complete is an interactive way to save typing a few characters. If you're scripting it you could just as well type out the |
yeah, but i've noticed that this binding works great for the vcr cassettes. Like, I have a line like this in my spec: so i would prefer to keep this binding universal |
|
This is wandering into the weeds so let me just conclude with a reminder that while FactoryBot will slurp up any
I'm gonna loosen that up a bit so that it doesn't force |
Please add an
:Rfactory
command that gives quick access totest/factories/**/*.rb
just like:Rmodel
gives quick access toapp/model/**/*.rb
. Thanks!The text was updated successfully, but these errors were encountered: