Created
May 17, 2012 18:43
-
-
Save tylersticka/2720837 to your computer and use it in GitHub Desktop.
Sublime Text 2 snippet for JS module
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<snippet> | |
<content><![CDATA[ | |
(function(app) { | |
var ${1:name} = (function() { | |
return { | |
${0} | |
}; | |
})(); | |
app.${1/(.)/\L\1\E/g} = $1; | |
})(${2:namespace}); | |
]]></content> | |
<!-- optional, allows you to type 'module' and tab to insert --> | |
<tabTrigger>module</tabTrigger> | |
<!-- optional, restricts to JS files --> | |
<scope>source.js</scope> | |
</snippet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment