Permalink
Browse files

cleanup on snippets

  • Loading branch information...
1 parent 4eb2fa0 commit 15cd1499c9e227bc4cab4268b29307418a5384f2 @amokan committed May 18, 2012
View
2 marionette.application.sublime-snippet
@@ -1,6 +1,6 @@
<snippet>
<content><![CDATA[
-${1:appName} = new Backbone.Marionette.Application();
+${1:MyApp} = new Backbone.Marionette.Application();
]]></content>
<tabTrigger>bma</tabTrigger>
<scope>source.js</scope>
View
6 marionette.approuter.sublime-snippet
@@ -1,6 +1,10 @@
<snippet>
<content><![CDATA[
-Backbone.Marionette.AppRouter.extend({appRoutes:{${0:properties}}});
+${1:MyRouter} = Backbone.Marionette.AppRouter.extend({
+ appRoutes:{
+ "some/route": "someMethod"
+ }
+});
]]></content>
<tabTrigger>bmar</tabTrigger>
<scope>source.js</scope>
View
4 marionette.itemview.sublime-snippet
@@ -1,6 +1,8 @@
<snippet>
<content><![CDATA[
-${1:viewName} = Backbone.Marionette.ItemView.extend({${0:properties}});
+${1:MyView} = Backbone.Marionette.ItemView.extend({
+ template: "#some-template"
+});
]]></content>
<tabTrigger>bmiv</tabTrigger>
<scope>source.js</scope>
View
13 marionette.module.sublime-snippet
@@ -1,10 +1,8 @@
<snippet>
<content><![CDATA[
-${1:appName}.module("${2:moduleName}", function(${2:moduleName}, ${1:appName}, Backbone, Marionette, $, _){
-
+${1:MyApp}.module("${2:MyModule}", function($2, $1, Backbone, Marionette, \$, _){
// Private Data And Functions
// --------------------------
-
var myData = "this is private data";
var myFunction = function(){
@@ -13,15 +11,14 @@ ${1:appName}.module("${2:moduleName}", function(${2:moduleName}, ${1:appName}, B
// Public Data And Functions
// -------------------------
-
- ${2:moduleName}.someData = "public data";
+ $2.someData = "public data";
- ${2:moduleName}.someFunction = function(){
- console.log(${moduleName}.someData);
+ $2.someFunction = function(){
+ console.log($2.someData);
};
});
]]></content>
<tabTrigger>bmm</tabTrigger>
<scope>source.js,source.js.embedded.html</scope>
- <description>Backbone.Marionette.Application.Module skeleton</description>
+ <description>Backbone.Marionette.Application.module skeleton</description>
</snippet>
View
4 marionette.region.sublime-snippet
@@ -1,6 +1,8 @@
<snippet>
<content><![CDATA[
-${1:appName}.addRegions({${0:properties}});
+${1:MyApp}.addRegions({
+ foo: "#foo"
+});
]]></content>
<tabTrigger>bmr</tabTrigger>
<scope>source.js</scope>
View
15 marionette.sublime-completions
@@ -4,6 +4,21 @@
"completions":
[
"Marionette",
+ "Backbone.Marionette",
+ "Marionette.Application",
+ "Marionette.AppRouter",
+ "Marionette.View",
+ "Marionette.ItemView",
+ "Marionette.CollectionView",
+ "Marionette.CompositeView",
+ "Marionette.Layout",
+ "Marionette.Region",
+ "Marionette.EventAggregator",
+ "Marionette.BindTo",
+ "Marionette.Renderer",
+ "Marionette.TemplateCache",
+ "Marionette.Callbacks",
+
"Application",
"AppRouter",
"View",
View
2 marionette_coffee.application.sublime-snippet
@@ -1,6 +1,6 @@
<snippet>
<content><![CDATA[
-${1:appName} = new Backbone.Marionette.Application()
+${1:MyApp} = new Backbone.Marionette.Application()
]]></content>
<tabTrigger>bmac</tabTrigger>
<scope>source.coffee</scope>
View
7 marionette_coffee.approuter.sublime-snippet
@@ -1,8 +1,9 @@
<snippet>
<content><![CDATA[
-${1:name} extends Backbone.Marionette.AppRouter() ->
- #appRoutes:
- #"some/route": "someMethod"
+${1:MyRouter} = Backbone.Marionette.AppRouter.extend(
+ appRoutes:
+ "some/route": "someMethod"
+)
]]></content>
<tabTrigger>bmarc</tabTrigger>
<scope>source.coffee</scope>
View
3 marionette_coffee.itemview.sublime-snippet
@@ -1,7 +1,6 @@
<snippet>
<content><![CDATA[
-${1:viewName} extends Backbone.Marionette.ItemView ->
- ${0:properties}
+${1:MyView} = Backbone.Marionette.ItemView.extend(template: "#some-template")
]]></content>
<tabTrigger>bmic</tabTrigger>
<scope>source.coffee</scope>
View
8 marionette_coffee.model.sublime-snippet
@@ -1,8 +0,0 @@
-<snippet>
- <content><![CDATA[
-Backbone.Model
-]]></content>
- <tabTrigger>bm</tabTrigger>
- <scope>source.coffee</scope>
- <description>Backbone Model</description>
-</snippet>
View
12 marionette_coffee.module.sublime-snippet
@@ -1,7 +1,6 @@
<snippet>
<content><![CDATA[
-${1:appName}.module("${2:moduleName}", (${2:moduleName}, ${1:appName}, Backbone, Marionette, $, _) ->
-
+${1:MyApp}.module("${2:MyModule}", ($2, $1, Backbone, Marionette, \$, _) ->
# Private Data And Functions
# --------------------------
@@ -13,12 +12,13 @@ ${1:appName}.module("${2:moduleName}", (${2:moduleName}, ${1:appName}, Backbone,
# Public Data And Functions
# -------------------------
- ${2:moduleName}.someData = "public data"
+ $2.someData = "public data"
- ${2:moduleName}.someFunction = () ->
- console.log(${moduleName}.someData)
+ $2.someFunction = () ->
+ console.log($2.someData)
+)
]]></content>
<tabTrigger>bmmc</tabTrigger>
<scope>source.coffee</scope>
- <description>Backbone.Marionette.Application.Module skeleton</description>
+ <description>Backbone.Marionette.Application.module skeleton</description>
</snippet>
View
4 marionette_coffee.region.sublime-snippet
@@ -1,7 +1,7 @@
<snippet>
<content><![CDATA[
-${1:appName}.addRegions ->
- ${0:properties}
+${0:MyApp}.addRegions ->
+ foo: "#foo"
]]></content>
<tabTrigger>bmrc</tabTrigger>
<scope>source.coffee</scope>

0 comments on commit 15cd149

Please sign in to comment.