Skip to content

Instantly share code, notes, and snippets.

@po8rewq
Created March 7, 2017 09:55
Show Gist options
  • Save po8rewq/b95c99ca25703eac3bfb6d8f5162d25c to your computer and use it in GitHub Desktop.
Save po8rewq/b95c99ca25703eac3bfb6d8f5162d25c to your computer and use it in GitHub Desktop.
{
"class": {
"prefix": "class",
"body": [
"package ${1};",
"class ${name:$TM_FILENAME}",
"{",
"",
"\tpublic function new(${2})",
"\t{",
"\t\t",
"\t}",
"",
"}"
],
"description": "class"
},
"for loop": {
"prefix": "for",
"body": [
"for (${1:value} in $2)",
"{",
"}"
],
"description": "for loop"
},
"function": {
"prefix": "function",
"body": [
"${1:public} function ${2:name} ()${3}",
"{",
"}"
],
"description": "function"
},
"typedef": {
"prefix": "typedef",
"body": [
"typedef ${1} = {",
"}"
],
"description": ""
},
"enum": {
"prefix": "enum",
"body": [
"enum ${1} {",
"}"
],
"description": ""
},
"switch": {
"prefix": "switch",
"body": [
"switch (${1}) {",
"\tdefault: null;",
"}"
],
"description": ""
},
"try catch": {
"prefix": "try",
"body": [
"try",
"{",
"}",
"catch(e){}"
],
"description": ""
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment