Skip to content

Instantly share code, notes, and snippets.

@ZYinMD
Last active May 11, 2018 18:15
Show Gist options
  • Save ZYinMD/57e5628648513ed9780a0b9eb21519c3 to your computer and use it in GitHub Desktop.
Save ZYinMD/57e5628648513ed9780a0b9eb21519c3 to your computer and use it in GitHub Desktop.
JavaScript function declaration snippet for Sublime Text 3
<!-- Documentation: http://docs.sublimetext.info/en/latest/extensibility/snippets.html -->
<!-- Clone or save this code as js-function.sublime-snippet into Data/Packages/User. No need to restart Sublime.
(If you Copy-Paste-SaveAs... with Sublime, be careful not to save as .xml. It's actually hard not to) -->
<snippet>
<content>
<![CDATA[
function ${1:}(${2:}) {
${3:}
}
]]>
</content>
<!-- Set a tabTrigger: how to trigger the snippet -->
<tabTrigger>fun</tabTrigger>
<!-- Optional: Set a description for the tabTrigger -->
<description>function</description>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>text.html, text.plain, source.js</scope>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment