Skip to content

Instantly share code, notes, and snippets.

@bitpshr
Forked from neonstalwart/define.sublime-snippet
Created May 15, 2013 01:44
Show Gist options
  • Save bitpshr/5581077 to your computer and use it in GitHub Desktop.
Save bitpshr/5581077 to your computer and use it in GitHub Desktop.
<snippet>
<content><![CDATA[
define([
${1:'dojo/_base/declare'}
], function (${2:declare}) {
return declare(${3});
});
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>define</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.js</scope>
</snippet>
<snippet>
<content><![CDATA[
this.inherited(arguments);
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>inherited</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.js</scope>
</snippet>
<snippet>
<content><![CDATA[
define([
'dojo/_base/declare',
'dijit/_WidgetBase',
'dijit/_TemplatedMixin',
'dojo/text!./template/${1}'
], function (declare, Widget, Templated, template) {
return declare([Widget, Templated], {
templateString: template,
${2}
);
});
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>templated</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.js</scope>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment