Permalink
Browse files

Updated layout completion in all the views, added some new completion…

… for methods, computed properties and regular properties, added class, id, and child snippets, bunch of other smaller updates
  • Loading branch information...
1 parent 0cb8a01 commit d3867a58de8cb4299697f1505ce919bbbe32cea8 Majd Taby committed Nov 24, 2010
@@ -3,8 +3,7 @@
<plist version="1.0">
<dict>
<key>content</key>
- <string>${TM_SELECTED_TEXT}Observer: function()
-{
+ <string>${TM_SELECTED_TEXT}Observer: function(){
$0
}.observes('${1:${TM_SELECTED_TEXT:${TM_CURRENT_WORD:property}}}'${2:,'${3:secondary}'})${10:,}</string>
<key>keyEquivalent</key>
@@ -3,8 +3,7 @@
<plist version="1.0">
<dict>
<key>content</key>
- <string>${TM_SELECTED_TEXT}: function()
-{
+ <string>${TM_SELECTED_TEXT}: function(){
$0
}.property('${1:${TM_SELECTED_TEXT:${TM_CURRENT_WORD:property}}}'${2:,'${3:secondary}'})${10:,}</string>
<key>keyEquivalent</key>
View
@@ -4,11 +4,11 @@
<dict>
<key>content</key>
<string>SC.ButtonView.design({
- layout: { top: ${2:0}, right: ${3:0}, bottom: ${4:0}, left: ${5:0} },
- title: '${6:Button}',
- action: '${7:myMethod}',
- target: '${8:MyApp.Controller}'
-})${9:,}</string>
+ layout: {${2:top:${3:0}}${4:,right:${5:0}}${6:,bottom:${7:0}}${8:,left:${9:0}}${10:,height:${11:0}}${12:,width:${13:0}}},
+ title: '${14:Button}',
+ action: '${15:myMethod}',
+ target: '${16:MyApp.Controller}'
+}),</string>
<key>name</key>
<string>button</string>
<key>tabTrigger</key>
@@ -4,10 +4,10 @@
<dict>
<key>content</key>
<string>SC.CheckboxView.design({
- layout: { top: ${2:0}, right: ${3:0}, bottom: ${4:0}, left: ${5:0} },
- value: ${6:YES},
- displayTitle: '${7:Checkbox}'
-})${8:,}</string>
+ layout: {${2:top:${3:0}}${4:,right:${5:0}}${6:,bottom:${7:0}}${8:,left:${9:0}}${10:,height:${11:0}}${12:,width:${13:0}}},
+ value: ${14:YES},
+ displayTitle: '${15:Checkbox}'
+}),</string>
<key>name</key>
<string>checkbox</string>
<key>tabTrigger</key>
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>content</key>
+ <string>childViews: "${1:Views}".w(),</string>
+ <key>name</key>
+ <string>childviews</string>
+ <key>tabTrigger</key>
+ <string>child</string>
+ <key>uuid</key>
+ <string>C7601FB5-811D-48F9-A348-D0EE91FEFC17</string>
+</dict>
+</plist>
@@ -4,10 +4,10 @@
<dict>
<key>content</key>
<string>SC.CollectionView.design({
- layout: { top: ${2:0}, right: ${3:0}, bottom: ${4:0}, left: ${5:0} },
- contentBinding: '${6:MyApp.controller.arrangedObjects}',
- selectionBinding: '${7:MyApp.controller.selection}'
-})${8:,}</string>
+ layout: {${2:top:${3:0}}${4:,right:${5:0}}${6:,bottom:${7:0}}${8:,left:${9:0}}${10:,height:${11:0}}${12:,width:${13:0}}},
+ contentBinding: '${14:MyApp.controller.arrangedObjects}',
+ selectionBinding: '${15:MyApp.controller.selection}'
+}),</string>
<key>name</key>
<string>collection</string>
<key>tabTrigger</key>
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>content</key>
+ <string>/**
+ * ${1:Description}
+ *
+ * @field
+ * @type ${2:TYPE}
+*/
+${3:propertyName}DidChange: function(){
+ ${5:// Code}
+}.property('${3:${TM_SELECTED_TEXT:${TM_CURRENT_WORD:property}}}'${6:,'${7:secondary}'})${8:,}</string>
+ <key>name</key>
+ <string>computed property</string>
+ <key>tabTrigger</key>
+ <string>computed</string>
+ <key>uuid</key>
+ <string>70432AC3-3691-42CF-A63F-F880E6815520</string>
+</dict>
+</plist>
@@ -4,9 +4,9 @@
<dict>
<key>content</key>
<string>SC.ContainerView.design({
- layout: { top:${2:0}, right: ${3:0}, bottom: ${4:0}, left: ${5:0} },
- nowShowing: '${6:viewName}'.w()
-})${7:,}</string>
+ layout: {${2:top:${3:0}}${4:,right:${5:0}}${6:,bottom:${7:0}}${8:,left:${9:0}}${10:,height:${11:0}}${12:,width:${13:0}}},
+ nowShowing: '${14:viewName}'.w()
+}),</string>
<key>name</key>
<string>container</string>
<key>tabTrigger</key>
View
@@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>content</key>
- <string>.get('${1:property}');</string>
+ <string>.get('${1:property}')</string>
<key>name</key>
<string>get()</string>
<key>scope</key>
View
@@ -4,10 +4,10 @@
<dict>
<key>content</key>
<string>SC.GridView.design({
- layout: { top: ${2:0}, right: ${3:0}, bottom: ${4:0}, left: ${5:0} },
- contentBinding: '${6:MyApp.controller.arrangedObjects}',
- selectionBinding: '${7:MyApp.controller.selection}'
-})${8:,}</string>
+ layout: {${2:top:${3:0}}${4:,right:${5:0}}${6:,bottom:${7:0}}${8:,left:${9:0}}${10:,height:${11:0}}${12:,width:${13:0}}},
+ contentBinding: '${14:MyApp.controller.arrangedObjects}',
+ selectionBinding: '${15:MyApp.controller.selection}'
+}),</string>
<key>name</key>
<string>grid</string>
<key>tabTrigger</key>
View
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>content</key>
+ <string>layerId: '${1:layerId}',</string>
+ <key>name</key>
+ <string>id</string>
+ <key>tabTrigger</key>
+ <string>id</string>
+ <key>uuid</key>
+ <string>80FCBC4D-780D-4EF3-9D05-F2AD444B39E4</string>
+</dict>
+</plist>
View
@@ -4,9 +4,9 @@
<dict>
<key>content</key>
<string>SC.LabelView.design({
- layout: { top: ${2:0}, right: ${3:0}, bottom: ${4:0}, left: ${5:0} },
- value: '${6:Label}'
-})${7:,}</string>
+ layout: {${2:top:${3:0}}${4:,right:${5:0}}${6:,bottom:${7:0}}${8:,left:${9:0}}${10:,height:${11:0}}${12:,width:${13:0}}},
+ value: '${14:Label}'
+}),</string>
<key>name</key>
<string>label</string>
<key>tabTrigger</key>
View
@@ -4,10 +4,10 @@
<dict>
<key>content</key>
<string>SC.ListView.design({
- layout: { top: ${2:0}, right: ${3:0}, bottom: ${4:0}, left: ${5:0} },
- contentBinding: '${6:MyApp.controller.arrangedObjects}',
- selectionBinding: '${7:MyApp.controller.selection}'
-})${8:,}</string>
+ layout: {${2:top:${3:0}}${4:,right:${5:0}}${6:,bottom:${7:0}}${8:,left:${9:0}}${10:,height:${11:0}}${12:,width:${13:0}}},
+ contentBinding: '${14:MyApp.controller.arrangedObjects}',
+ selectionBinding: '${15:MyApp.controller.selection}'
+})${16:,}</string>
<key>name</key>
<string>list</string>
<key>tabTrigger</key>
View
@@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>content</key>
- <string>SC.Logger.log("${1:Message}");</string>
+ <string>console.log(${1:"${2:Message}"});</string>
<key>name</key>
<string>log</string>
<key>tabTrigger</key>
View
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>content</key>
+ <string>/**
+ * ${1:Description}
+ *
+ * @param ${2:TYPE} ${3:NAME} ${4:DESCRIPTION}
+ * @returns ${5:TYPE}
+*/
+${6:methodName}: function(${3:arguments}){
+ ${7:// Code}
+}${8:,}</string>
+ <key>name</key>
+ <string>method</string>
+ <key>tabTrigger</key>
+ <string>method</string>
+ <key>uuid</key>
+ <string>FFF0A024-6B42-48B6-8BD6-77405F6D4E05</string>
+</dict>
+</plist>
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>content</key>
+ <string>/**
+ * ${1:Description}
+ *
+ * @type ${2:TYPE}
+*/
+${3:propertyName}: ${4:value},</string>
+ <key>name</key>
+ <string>property</string>
+ <key>tabTrigger</key>
+ <string>property</string>
+ <key>uuid</key>
+ <string>CCF33437-4887-4A73-861C-F44A053F31B0</string>
+</dict>
+</plist>
View
@@ -4,12 +4,12 @@
<dict>
<key>content</key>
<string>SC.RadioView.design({
- layout: { top: ${2:0}, right: ${3:0}, bottom: ${4:0}, left: ${5:0} },
- layoutDirection: ${7:SC.LAYOUT_VERTICAL},
- items: [${8:{ title: 'Welcome', value: 'welcome'\}, ...}],
- itemTitleKey: '${9:title}',
- itemValueKey: '${10:value}'
-})${11:,}</string>
+ layout: {${2:top:${3:0}}${4:,right:${5:0}}${6:,bottom:${7:0}}${8:,left:${9:0}}${10:,height:${11:0}}${12:,width:${13:0}}},
+ layoutDirection: ${14:SC.LAYOUT_VERTICAL},
+ items: [${15:{ title: 'Welcome', value: 'welcome'\}, ...}],
+ itemTitleKey: '${16:title}',
+ itemValueKey: '${17:value}'
+}),</string>
<key>name</key>
<string>radio</string>
<key>tabTrigger</key>
View
@@ -4,9 +4,9 @@
<dict>
<key>content</key>
<string>SC.SceneView.design({
- layout: { top: ${2:0}, right: ${3:0}, bottom: ${4:0}, left: ${5:0} },
- scenes: '${6:master detail}',
- nowShowing: '${7:master}',
+ layout: {${2:top:${3:0}}${4:,right:${5:0}}${6:,bottom:${7:0}}${8:,left:${9:0}}${10:,height:${11:0}}${12:,width:${13:0}}},
+ scenes: '${14:master detail}',
+ nowShowing: '${15:master}',
transitionDuration: 200
})${8:,}</string>
<key>name</key>
@@ -4,9 +4,9 @@
<dict>
<key>content</key>
<string>SC.ScrollView.design({
- layout: { top: ${2:0}, right: ${3:0}, bottom: ${4:0}, left: ${5:0} },
- contentView: ${6:SC.View...}
-})${7:,}</string>
+ layout: {${2:top:${3:0}}${4:,right:${5:0}}${6:,bottom:${7:0}}${8:,left:${9:0}}${10:,height:${11:0}}${12:,width:${13:0}}},
+ contentView: ${14:SC.View...}
+}),</string>
<key>name</key>
<string>scroll</string>
<key>tabTrigger</key>
@@ -4,14 +4,14 @@
<dict>
<key>content</key>
<string>SC.SegmentedView.design({
- layout: { top: ${2:0}, right: ${3:0}, bottom: ${4:0}, left: ${5:0} },
- layoutDirection: ${7:SC.LAYOUT_VERTICAL},
- allowsMultipleSelection: ${8:NO},
- allowsEmptySelection: ${9:YES},
- items: [${10:{ title: 'Welcome', value: 'welcome'\}, ...}],
- itemTitleKey: '${11:title}',
- itemValueKey: '${12:value}'
-})${13:,}</string>
+ layout: {${2:top:${3:0}}${4:,right:${5:0}}${6:,bottom:${7:0}}${8:,left:${9:0}}${10:,height:${11:0}}${12:,width:${13:0}}},
+ layoutDirection: ${14:SC.LAYOUT_VERTICAL},
+ allowsMultipleSelection: ${15:NO},
+ allowsEmptySelection: ${16:YES},
+ items: [${117:{ title: 'Welcome', value: 'welcome'\}, ...}],
+ itemTitleKey: '${18:title}',
+ itemValueKey: '${19:value}'
+}),</string>
<key>name</key>
<string>segmented</string>
<key>tabTrigger</key>
View
@@ -4,11 +4,11 @@
<dict>
<key>content</key>
<string>SC.SelectView.design({
- layout: { top: ${2:0}, right: ${3:0}, bottom: ${4:0}, left: ${5:0} },
- objects: [${8:{ title: 'Welcome', value: 'welcome'\}, ...}],
- nameKey: '${9:title}',
- valueKey: '${10:value}'
-})${11:,}</string>
+ layout: {${2:top:${3:0}}${4:,right:${5:0}}${6:,bottom:${7:0}}${8:,left:${9:0}}${10:,height:${11:0}}${12:,width:${13:0}}},
+ objects: [${14:{ title: 'Welcome', value: 'welcome'\}, ...}],
+ nameKey: '${15:title}',
+ valueKey: '${16:value}'
+}),</string>
<key>name</key>
<string>select</string>
<key>tabTrigger</key>
View
@@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>content</key>
- <string>.set('${1:property}',${2:value});</string>
+ <string>.set('${1:property}',${2:value})</string>
<key>name</key>
<string>set()</string>
<key>scope</key>
View
@@ -4,12 +4,12 @@
<dict>
<key>content</key>
<string>SC.SliderView.design({
- layout: { top: ${2:0}, right: ${3:0}, bottom: ${4:0}, left: ${5:0} },
- value: ${6:0.5},
- minimum: ${7:0},
- maximum: ${8:1},
- step: ${9:0.1}
-})${10:,}</string>
+ layout: {${2:top:${3:0}}${4:,right:${5:0}}${6:,bottom:${7:0}}${8:,left:${9:0}}${10:,height:${11:0}}${12:,width:${13:0}}},
+ value: ${14:0.5},
+ minimum: ${15:0},
+ maximum: ${16:1},
+ step: ${17:0.1}
+}),</string>
<key>name</key>
<string>slider</string>
<key>tabTrigger</key>
@@ -4,11 +4,11 @@
<dict>
<key>content</key>
<string>SC.SourceListView.design({
- layout: { top: ${2:0}, right: ${3:0}, bottom: ${4:0}, left: ${5:0} },
- contentBinding: '${6:MyApp.controller.arrangedObjects}',
- selectionBinding: '${7:MyApp.controller.selection}',
- contentValueKey: '${8:displayName}'
-})${9:,}</string>
+ layout: {${2:top:${3:0}}${4:,right:${5:0}}${6:,bottom:${7:0}}${8:,left:${9:0}}${10:,height:${11:0}}${12:,width:${13:0}}},
+ contentBinding: '${14:MyApp.controller.arrangedObjects}',
+ selectionBinding: '${15:MyApp.controller.selection}',
+ contentValueKey: '${16:displayName}'
+}),</string>
<key>name</key>
<string>sourcelist</string>
<key>tabTrigger</key>
View
@@ -4,16 +4,17 @@
<dict>
<key>content</key>
<string>SC.SplitView.design({
- layout: { top: ${2:0}, right: ${3:0}, bottom: ${4:0}, left: ${5:0} },
- defaultThickness: ${6:0.25},
- layoutDirection: ${7:SC.LAYOUT_VERTICAL},
+ layout: {${2:top:${3:0}}${4:,right:${5:0}}${6:,bottom:${7:0}}${8:,left:${9:0}}${10:,height:${11:0}}${12:,width:${13:0}}},
+ defaultThickness: ${14:0.25},
+ dividerThickness: ${15:5},
+ layoutDirection: ${16:SC.LAYOUT_VERTICAL},
- topLeftView: ${8:SC.View...}
+ topLeftView: ${17:SC.View...}
dividerView: SC.SplitDividerView.design(),
- bottomRightView: ${9:SC.View...}
-})${10:,}</string>
+ bottomRightView: ${18:SC.View...}
+}),</string>
<key>name</key>
<string>split</string>
<key>tabTrigger</key>
Oops, something went wrong.

0 comments on commit d3867a5

Please sign in to comment.