Skip to content

Instantly share code, notes, and snippets.

@cloud8421
Created April 30, 2013 16:49
Show Gist options
  • Select an option

  • Save cloud8421/5490033 to your computer and use it in GitHub Desktop.

Select an option

Save cloud8421/5490033 to your computer and use it in GitHub Desktop.
Rails.vim 5.0 projections sample files for London Vim user group
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"
\ }
\ }}
{
"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