Skip to content

Instantly share code, notes, and snippets.

@fespinoza
Forked from jsteiner/projections.json
Last active December 17, 2015 20:49
Show Gist options
  • Save fespinoza/5670465 to your computer and use it in GitHub Desktop.
Save fespinoza/5670465 to your computer and use it in GitHub Desktop.
My vim-rails config to define EmberJS commands, example command: :Rjmodel. More info in: http://robots.thoughtbot.com/post/50107717967/extending-rails-vim-with-custom-commands
{
"app/assets/javascripts/models/*.js": {
"command": "jmodel",
"alternate": "spec/javascripts/models/%s_spec.js",
"template": "App.%S = DS.Model.extend"
},
"app/assets/javascripts/controllers/*_controller.js": {
"command": "jcontroller",
"alternate": "spec/javascripts/controllers/%s_spec.js",
"template": "App.%SController = Ember.ObjectController.extend"
},
"app/assets/javascripts/views/*_view.js": {
"command": "jview",
"alternate": "spec/javascripts/views/%s_spec.js",
"related": "app/assets/javascripts/templates/%s.hbs",
"template": "%SView = Ember.View.extend"
},
"app/assets/javascripts/router.js": {
"command": "jrouter"
},
"app/assets/javascripts/routes/*_route.js": {
"command": "jroute",
"alternate": "spec/javascripts/routes/%s_spec.js",
"template": "App.%SRoute = Ember.Route.extend"
},
"spec/javascripts/*_spec.js": {
"command": "jspec",
"alternate": "app/assets/javascripts/%s.js"
},
"app/assets/javascripts/templates/*.hbs": {
"command": "template",
"alternate": "app/assets/javascripts/views/%s.js"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment