Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Sublime Javascript snippets
<snippet>
<content><![CDATA[base(this, '${1:method}'${2});${0}]]></content>
<tabTrigger>base</tabTrigger>
<scope>source.js</scope>
<description>Base method call</description>
</snippet>
<snippet>
<content><![CDATA[function(${3:first_argument}) {
${0:// body...}
}]]></content>
<tabTrigger>lambda</tabTrigger>
<scope>source.js</scope>
<description>Inline lambda</description>
</snippet>
<snippet>
<content><![CDATA[console.log('${1:Log message}'${2});${0}]]></content>
<tabTrigger>log</tabTrigger>
<scope>source.js</scope>
<description>Console log</description>
</snippet>
<snippet>
<content><![CDATA[it('should ${1:do something}', function (done) {
${0:// test...}
// done();
});]]></content>
<tabTrigger>it</tabTrigger>
<scope>source.js</scope>
<description>Mocha it</description>
</snippet>
<snippet>
<content><![CDATA[${1:class_name}.prototype.${2:method_name} = function(${3:first_argument}) {
${0:// body...}
};
]]></content>
<tabTrigger>proto</tabTrigger>
<scope>source.js</scope>
<description>Prototype method</description>
</snippet>
@LeZuse

This comment has been minimized.

Copy link
Owner Author

LeZuse commented Mar 19, 2013

Installation

git clone git@gist.github.com:2324352.git
cd 2324352
cp *.sublime-snippet "$HOME/Library/Application Support/Sublime Text 3/Packages/User"
@jkulak

This comment has been minimized.

Copy link

jkulak commented Apr 26, 2013

Nice i was just looking for console.log!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.