Skip to content

Instantly share code, notes, and snippets.

@agibsonsw
Created February 4, 2012 15:22
Show Gist options
  • Save agibsonsw/1738464 to your computer and use it in GitHub Desktop.
Save agibsonsw/1738464 to your computer and use it in GitHub Desktop.
Sublime snippet - JS switch statement
<snippet>
<content><![CDATA[switch (${1:expression}) {
case ${2:test1}:
${3:statement1};
break;
${4:case ${5:test2}:
${6:statement2};
break;}
default:
${7:// to do}
}]]>
</content>
<tabTrigger>switch</tabTrigger>
<scope>source.js</scope>
<description>switch statement</description>
</snippet>
@agibsonsw
Copy link
Author

A simple JS switch statement Snippet for Sublime Text 2. Adds two case statements, but you might copy or delete the second one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment