Created
April 30, 2013 16:49
-
-
Save cloud8421/5490033 to your computer and use it in GitHub Desktop.
Rails.vim 5.0 projections sample files for London Vim user group
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let g:rails_projections = { | |
| \ "config/projections.json": { | |
| \ "command": "projections" | |
| \ }} | |
| let g:rails_gem_projections = { | |
| \ "active_model_serializers": { | |
| \ "app/serializers/*_serializer.rb": { | |
| \ "command": "serializer", | |
| \ "affinity": "model" | |
| \ } | |
| \ }, | |
| \ "simple_form": { | |
| \ "app/inputs/*_input.rb": { | |
| \ "command": "input", | |
| \ "template": "class %SInput < SimpleForm::Inputs::CHANGEME\n def input\n\n end\nend" | |
| \ } | |
| \ }, | |
| \ "factory_girl_rails": { | |
| \ "spec/factories/*_factory.rb": { | |
| \ "command": "factory", | |
| \ "affinity": "collection", | |
| \ "alternate": "app/models/%i.rb", | |
| \ "related": "db/schema.rb#%s", | |
| \ "test": "spec/models/%i_spec.rb", | |
| \ "template": "FactoryGirl.define do\n factory :%i do\n end\nend", | |
| \ "keywords": "factory sequence" | |
| \ } | |
| \ }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "spec/requests/*_spec.rb": { | |
| "command": "request", | |
| "template": "require 'spec_helper'\n\ndescribe '%h' do\n\nend", | |
| "keywords": "describe context before it" | |
| }, | |
| "app/concerns/*.rb": { | |
| "command": "concern", | |
| "template": "module %S\n extend ActiveSupport::Concern\n\n included do\n\n end\nend", | |
| "test": "spec/concerns/%i_spec.rb", | |
| "keywords": "included" | |
| }, | |
| "app/presenters/*.rb": { | |
| "command": "presenter", | |
| "template": "class %S\n\nend", | |
| "test": "spec/presenters/%i_spec.rb" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment