Permalink
Browse files

ItemView snippet

  • Loading branch information...
1 parent f87b085 commit cbfe661674604a10850e912b49439256593ff7c3 @drnic drnic committed Jun 7, 2011
Showing with 36 additions and 3 deletions.
  1. +32 −0 Snippets/ItemView.tmSnippet
  2. +3 −3 Syntaxes/JavaScript (Backbone).tmLanguage
  3. +1 −0 info.plist
@@ -0,0 +1,32 @@
+<?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>var ${1:${2:Item}View} = Backbone.View.extend({
+ tagName: ${5:'${6:li}'},
+
+ events: {
+ // 'click button#add': 'callback'
+ },
+
+ initialize: function(){
+ _.bindAll(this, 'render');
+ },
+
+ render: function(){
+ \$(this.el);
+ return this;
+ }
+});
+</string>
+ <key>name</key>
+ <string>ItemView</string>
+ <key>scope</key>
+ <string>source.js.backbone</string>
+ <key>tabTrigger</key>
+ <string>viewi</string>
+ <key>uuid</key>
+ <string>18B5F867-B3C8-41C2-B190-E9501B4578BE</string>
+</dict>
+</plist>
@@ -14,7 +14,7 @@
<array>
<dict>
<key>match</key>
- <string>\bBackbone\.(?:Model|View)\b</string>
+ <string>\bBackbone\.(?:Collection|Model|View)\b</string>
<key>name</key>
<string>support.class.backbone</string>
</dict>
@@ -26,11 +26,11 @@
</dict>
<dict>
<key>include</key>
- <string>source.js.jquery</string>
+ <string>source.js</string>
</dict>
<dict>
<key>include</key>
- <string>source.js</string>
+ <string>source.js.jquery</string>
</dict>
<dict>
<key>include</key>
View
@@ -8,6 +8,7 @@
<array>
<string>4514D797-AC75-4515-A9D6-EECCEB0E3278</string>
<string>EC3DD3F4-7588-483F-84C0-660E044946DD</string>
+ <string>18B5F867-B3C8-41C2-B190-E9501B4578BE</string>
<string>F450B649-1EAD-460D-95EA-2CCA4EBD911B</string>
<string>D101A204-6EB9-4FD2-8264-CD105FB342C7</string>
<string>8D20801A-DCF4-4C78-9F81-CEA4D1ECE1A0</string>

0 comments on commit cbfe661

Please sign in to comment.