Skip to content

Instantly share code, notes, and snippets.

@AntouanK
Last active January 1, 2016 05:29
Show Gist options
  • Save AntouanK/8099285 to your computer and use it in GitHub Desktop.
Save AntouanK/8099285 to your computer and use it in GitHub Desktop.
my snippets ( JavaScript )
anonymous_self.sublime-snippet
<snippet>
<content><![CDATA[
(function() {
${1}
}());
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>funas</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.JavaScript</scope> -->
</snippet>
///////////////////////////////////////
consoleLog.sublime-snippet
<snippet>
<content><![CDATA[
console.log(${1:msg});
${2}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>clog</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>
/////////////////////////////////////
dateNow.sublime-snippet
<snippet>
<content><![CDATA[
Date.now()
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>datenow</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>
/////////////////////////////////////
else.sublime-snippet
<snippet>
<content><![CDATA[
else {
${1:// body}
}
${2}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>else</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>
/////////////////////////////////////
funas.sublime-snippet
<snippet>
<content><![CDATA[
(function() {
${1}
}());
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>funas</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.JavaScript</scope> -->
</snippet>
/////////////////////////////////////
function.sublime-snippet
<snippet>
<content><![CDATA[
function(${1:arg}){${2:
${3:// body}
}}${4:;}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>function</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>
/////////////////////////////////////
jsdoc.sublime-snippet
<snippet>
<content><![CDATA[
/**
* @description
* @function
* @name ${1:name}
* @memberOf ${2:class}
*/
${3}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>jsdoc</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- scope>source.JavaScript</scope -->
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment