Skip to content

Instantly share code, notes, and snippets.

@milosdakic
Created January 26, 2012 23:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save milosdakic/1685788 to your computer and use it in GitHub Desktop.
Save milosdakic/1685788 to your computer and use it in GitHub Desktop.
Backbone.js Vim Snippets
# Class
snippet bc
var ${1:Thing} = Class.extend({
initialize: function(${2:Attributes}) {
}
});
# Model
snippet bbm
var ${1:Thing} = Backbone.Model.extend({
initialize: function () {
}
});
# Collection
snippet bbc
var ${1:Thing} = Backbone.Collection.extend({
model: ${2:Thing}
});
# Router
snippet bbr
var ${1:Thing} = Backbone.Router.extend({
routes: {
},
});
# View
snippet bbv
var ${1:Thing} = Backbone.View.extend({
tagName: '${2:Tag}'
el: '${3:Tag}'
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment