Skip to content

Instantly share code, notes, and snippets.

@jsteiner
Last active November 17, 2017 22:17
Show Gist options
  • Save jsteiner/5555868 to your computer and use it in GitHub Desktop.
Save jsteiner/5555868 to your computer and use it in GitHub Desktop.
Example Rails.vim projections for an Ember.js project.
{
"app/assets/javascripts/models/*.coffee": {
"command": "jmodel",
"alternate": "spec/javascripts/models/%s_spec.coffee",
"template": "App.%S = DS.Model.extend"
},
"app/assets/javascripts/controllers/*_controller.coffee": {
"command": "jcontroller",
"alternate": "spec/javascripts/controllers/%s_spec.coffee",
"template": "App.%SController = Ember.ObjectController.extend"
},
"app/assets/javascripts/views/*_view.coffee": {
"command": "jview",
"alternate": "spec/javascripts/views/%s_spec.coffee",
"related": "app/assets/javascripts/templates/%s.hbs",
"template": "%SView = Ember.View.extend"
},
"app/assets/javascripts/router.coffee": {
"command": "jrouter"
},
"app/assets/javascripts/routes/*_route.coffee": {
"command": "jroute",
"alternate": "spec/javascripts/routes/%s_spec.coffee",
"template": "App.%SRoute = Ember.Route.extend"
},
"spec/javascripts/*_spec.coffee": {
"command": "jspec",
"alternate": "app/assets/javascripts/%s.coffee"
},
"app/assets/javascripts/templates/*.hbs": {
"command": "template",
"alternate": "app/assets/javascripts/views/%s.coffee"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment