Skip to content

Instantly share code, notes, and snippets.

@LeZuse
Last active March 20, 2023 16:52
Show Gist options
  • Save LeZuse/2324352 to your computer and use it in GitHub Desktop.
Save LeZuse/2324352 to your computer and use it in GitHub Desktop.
Sublime Text 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
Copy link
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
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