Skip to content

Instantly share code, notes, and snippets.

@Daniel-Wiedemann
Created February 7, 2014 18:17
Show Gist options
  • Save Daniel-Wiedemann/8868541 to your computer and use it in GitHub Desktop.
Save Daniel-Wiedemann/8868541 to your computer and use it in GitHub Desktop.
Sublime Text 2 Snippet Skeleton namespaces
<snippet>
<content><![CDATA[
/**
* name: $TM_FULLNAME
* email: $TM_EMAIL
* filename: $TM_FILENAME
* @type {{}}
*/
(function( ${1:namespace}, \$, undefined ) {
/**
* Initialize the page.
* @return void
*/
${1}.init = function(options) {
// set options with parameters from jsp for nameSpace-wide using
${1}.options = options || {};
};
}( window.${1} = window.${1} || {}, jQuery ));
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>skeleton</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.js</scope>
<!-- Optional: Description to show in the menu -->
<description>Skeleton namespace for functions</description>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment