143 lines
2.6 KiB
JSON
143 lines
2.6 KiB
JSON
{
|
|
"for": {
|
|
"prefix": "for",
|
|
"body": [
|
|
"for {set ${1:index} ${2:0}} {\\$${1:index} < ${3:length}} {incr ${1:index}} {",
|
|
"\t$0",
|
|
"}"
|
|
],
|
|
"description": "For Loop"
|
|
},
|
|
"foreach": {
|
|
"prefix": "foreach",
|
|
"body": [
|
|
"foreach ${1:var} ${2:list} {",
|
|
"\t$0",
|
|
"}"
|
|
],
|
|
"description": "Foreach Loop"
|
|
},
|
|
"if": {
|
|
"prefix": "if",
|
|
"body": [
|
|
"if {${1:var}} {",
|
|
"\t$0",
|
|
"}"
|
|
],
|
|
"description": "If Condition"
|
|
},
|
|
"elseif": {
|
|
"prefix": "elseif",
|
|
"body": [
|
|
"elseif {${1:var}} {",
|
|
"\t$0",
|
|
"}"
|
|
],
|
|
"description": "ElseIf Condition"
|
|
},
|
|
"else": {
|
|
"prefix": "else",
|
|
"body": [
|
|
"else {",
|
|
"\t$0",
|
|
"}"
|
|
],
|
|
"description": "Else Block"
|
|
},
|
|
"proc": {
|
|
"prefix": "proc",
|
|
"body": [
|
|
"proc ${1:name} {${2:args}} {",
|
|
"\t$0",
|
|
"}"
|
|
],
|
|
"description": "Proc Block"
|
|
},
|
|
"while": {
|
|
"prefix": "while",
|
|
"body": [
|
|
"while {${1:var}} {",
|
|
"\t$0",
|
|
"}"
|
|
],
|
|
"description": "While Loop"
|
|
},
|
|
"catch": {
|
|
"prefix": "catch",
|
|
"body": [
|
|
"catch {${1:body}} ${2:var}"
|
|
],
|
|
"description": "Catch Block"
|
|
},
|
|
"try": {
|
|
"prefix": "try",
|
|
"body": [
|
|
"try {",
|
|
"\t$1",
|
|
"} finally {",
|
|
"\t$0",
|
|
"}"
|
|
],
|
|
"description": "Try Block"
|
|
},
|
|
"switch": {
|
|
"prefix": "switch",
|
|
"body": [
|
|
"switch ${1:var} {",
|
|
"\t${2:case} {$3}",
|
|
"\tdefault {$0}",
|
|
"}"
|
|
],
|
|
"description": "Switch Block"
|
|
},
|
|
"oo::class create": {
|
|
"prefix": "oo::class create",
|
|
"body": [
|
|
"oo::class create ${1:name} {",
|
|
"\t${2:superclass s}",
|
|
"\tconstructor {} {",
|
|
"\t\t$3",
|
|
"\t}",
|
|
"\tmethod ${4:m} {} {",
|
|
"\t\t$0",
|
|
"\t}",
|
|
"}"
|
|
],
|
|
"description": "Class Create"
|
|
},
|
|
"tk_chooseDirectory": {
|
|
"prefix": "tk_chooseDirectory",
|
|
"body": [
|
|
"tk_chooseDirectory ${-initialdir dirname -mustexist boolean -title titleString}"
|
|
],
|
|
"description": "Choose Directory"
|
|
},
|
|
"tk_getOpenFile": {
|
|
"prefix": "tk_getOpenFile",
|
|
"body": [
|
|
"tk_getOpenFile -filetypes {",
|
|
"\t\t{{Text Files} {.txt} }",
|
|
"\t\t{{All Files} * }",
|
|
"\t}"
|
|
],
|
|
"description": "Open File Dialog"
|
|
},
|
|
"tk_getSaveFile": {
|
|
"prefix": "tk_getSaveFile",
|
|
"body": [
|
|
"tk_getSaveFile -filetypes {",
|
|
"\t\t{{Text Files} {.txt} }",
|
|
"\t\t{{All Files} * }",
|
|
"\t}"
|
|
],
|
|
"description": "Save File Dialog"
|
|
},
|
|
"tk_messageBox": {
|
|
"prefix": "tk_messageBox",
|
|
"body": [
|
|
"tk_messageBox ${-message msg}"
|
|
],
|
|
"description": "Message Box"
|
|
}
|
|
}
|