Created
November 29, 2016 03:04
-
-
Save yaqinking/81b6e631eb114f023b91f22dec2c5301 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"scope":"source.tjs", | |
"author": "yaqinking", | |
"completions": | |
[ | |
{ "-------": "-------------DECLARE START----------- " }, | |
{ "trigger": "func \t Declare function", "contents": "function $1($2) {\n $3\n}" }, | |
{ "trigger": "func \t Declare function call super.$1(...)", "contents": "function $1($2) {\n $3\n super.$1(...);\n}" }, | |
{ "trigger": "classExtendsWindow \t Declare Window subclass", "contents": "class $1 extends Window {\n function $1() {\n super.Window();\n $3\n }\n\n function finalize() {\n super.finalize();\n }\n}" }, | |
{ "trigger": "classExtendsLayer \t Declare Layer subclass", "contents": "class $1 extends Layer {\n function $1(window, parent) {\n super.Layer(window, parent);\n $3\n }\n\n function finalize() {\n super.finalize();\n }\n}" }, | |
{ "-------": "-------------DECLARE END----------- " }, | |
{ "-------": "-------------CONDITION START----------- " }, | |
{ "trigger": "if \t", "contents": "if ($1) {$2}" }, | |
{ "trigger": "if else \t", "contents": "if ($1) {$2} else {$3}" }, | |
{ "trigger": "if else if \t", "contents": "if ($1) {$2} else if ($3) {$4}" }, | |
{ "-------": "-------------CONDITION END----------- " }, | |
{ "-------": "-------------VARIABLE START----------- " }, | |
{ "trigger": "var \t var $1 = $2;", "contents": "var $1 = $2;" }, | |
{ "trigger": "va \t var $1;", "contents": "var $1;" }, | |
{ "-------": "-------------VARIABLE END----------- " }, | |
{ "-------": "-------------SYSTEM START----------- " }, | |
{ "trigger": "sysinform \t System.inform();", "contents": "System.inform($1);" }, | |
{ "trigger": "sysinput \t System.inputString();", "contents": "System.inputString(\"${1:WindowTitle}\", \"${2:Hint}\", \"\");" }, | |
{ "-------": "-------------SYSTEM END----------- " }, | |
{ "-------": "-------------LOOP START----------- " }, | |
{ "trigger": "while \t ", "contents": "while ($1) {$2}" }, | |
{ "trigger": "for \t ", "contents": "for ($1 = $2; $1 <= $3; $1++) {$4}" }, | |
{ "-------": "-------------LOOP END----------- " }, | |
{ "trigger": "switch \t ", "contents": "switch ($1) {\n case ${2:1}:\n $3;\n break;\n case ${4:2}:\n $5;\n break;\n default:\n $6;\n}" }, | |
{ "trigger": " \t ", "contents": "" }, | |
{ "trigger": " \t ", "contents": "" }, | |
{ "trigger": " \t ", "contents": "" }, | |
{ "trigger": "charAt \t ", "contents": "charAt($1)" }, | |
{ "-------": "-------------OBJECT START----------- " }, | |
{ "trigger": "date \t var $1 = new Date();", "contents": "var $1 = new Date();" }, | |
{ "trigger": "array \t var $1 = new Array();", "contents": "var $1 = new Array();" }, | |
{ "-------": "-------------OBJECT END----------- " }, | |
{ "trigger": "layer \t new Layer(class, parentLayer)", "contents": "new Layer(${1:this}, ${2:null})" }, | |
{ "trigger": "arr \t var $1 = [\"$2\",\"$3\"]", "contents": "var $1 = [\"$2\",\"$3\"];" }, | |
{ "trigger": "add \t add(object);", "contents": "add($1);" }, | |
{ "trigger": "remove \t Array.remove(object);", "contents": "remove($1);" }, | |
{ "trigger": "find \t Array.find(object);", "contents": "find($1);" }, | |
{ "trigger": "clearArray \t Array.clear();", "contents": "clear();\n$0" }, | |
{ "trigger": "count \t Array.count", "contents": "count" }, | |
{ "trigger": "insert \t Array.insert(index, object);", "contents": "insert($1, $2);" }, | |
{ "-------": "-------------Methods 方法补全----------- " }, | |
{ "-------": "-------------Methods 方法补全----------- " }, | |
{ "-------": "-------------Methods 方法补全----------- " }, | |
{ "trigger": "getYear \t ", "contents": "getYear();" }, | |
{ "trigger": "getMonth \t ", "contents": "getMonth();" }, | |
{ "trigger": "getDate \t ", "contents": "getDate();" }, | |
{ "trigger": "getHours \t ", "contents": "getHours();" }, | |
{ "trigger": "getMinutes \t ", "contents": "getMinutes();" }, | |
{ "trigger": "getSeconds \t ", "contents": "getSeconds();" }, | |
{ "trigger": " \t ", "contents": "" }, | |
{ "trigger": "dictionary \t var $1 = new Dictionary();", "contents": "var $1 = new Dictionary();" }, | |
{ "trigger": "dict \t var $1 = %[\"key\" => value]", "contents": "var $1 = %[\"$2\" => $3 ];" }, | |
{ "trigger": "key value \t \"key\" => value", "contents": "\"$1\" => $2" }, | |
{ "trigger": "clearDictionary \t Dictionary.clear incontextof $1", "contents": "(Dictionary.clear incontextof $1)();\n$0" }, | |
{ "trigger": "three \t a ? b : c", "contents": "$1 ? $2 : $3" }, | |
{ "trigger": "invalidate \t invalidate $1;", "contents": "invalidate $1;" }, | |
{ "trigger": "isvalid \t $1 isvalid;", "contents": "$1 isvalid" }, | |
{ "trigger": "getLocalName \t Storages.getLocalName($1)", "contents": "getLocalName($1)" }, | |
{ "trigger": "extractStorageExt \t Storages.extractStorageExt($1)", "contents": "extractStorageExt($1)" }, | |
{ "trigger": "selectFile \t Storages.selectFile(params)", "contents": "selectFile($1)" }, | |
{ "trigger": "setSize \t setSize(width, height)", "contents": "setSize($1, $2);\n" }, | |
{ "trigger": "setPos \t Window.setPos(left, top)", "contents": "setPos($1, $2);\n$0" }, | |
{ "trigger": "setPos \t Layer.setPos(left, top, width, height)", "contents": "setPos(${1:0}, ${2:0}, $3, $4);\n$0" }, | |
{ "trigger": "fillRect \t Layer.fillRect(left, top, width, height, color[0xAlphaRGB])", "contents": "fillRect(${1:0}, ${2:0}, ${3:width}, ${4:height}, ${5:0xFFC0C0FF})" }, | |
{ "trigger": "setInnerSize \t Window.setInnerSize(width, height)", "contents": "setInnerSize($1, $2);" }, | |
{ "trigger": "loadImages \t loadImages(\"FileName\");", "contents": "loadImages(\"$1\");\n$0" }, | |
{ "trigger": "setSizeToImageSize \t setSizeToImageSize();", "contents": "setSizeToImageSize();\n$0" }, | |
{ "trigger": "drawText11 \t drawText(x, y, text, color, opacity, antialias, shadowlevel, shadowcolor, shadowwidth, shadowofsx, shadowofsy)", "contents": "drawText(${1:x}, ${2:y}, ${3:text}, ${4:color}, ${5:opacity}, ${6:antialias}, ${7:shadowlevel}, ${8:shadowcolor}, ${9:shadowwidth}, ${10:shadowofsx}, ${11:shadowofsy});" }, | |
{ "trigger": "drawText4 \t drawText(x, y, text, color)", "contents": "drawText(${1:x}, ${2:y}, ${3:text}, ${4:color});\n$0" }, | |
{ "trigger": "with \t with () {}", "contents": "with ($1) {\n $2\n}" }, | |
{ "trigger": "getTextWidth \t getTextWidth($1)", "contents": "getTextWidth($1);\n$0" }, | |
{ "trigger": "getTextHeight \t getTextHeight($1)", "contents": "getTextHeight($1);\n$0" }, | |
{ "trigger": " \t ", "contents": "-----------Event Handler-----------" }, | |
{ "trigger": "onMouseUp \t Event onMouseUp", "contents": "function onMouseUp(x, y, button, shift) {\n $1\n super.onMouseUp(...);\n}" }, | |
{ "trigger": "close \t close();", "contents": "close();\n$0" }, | |
{ "trigger": "pluginLink \t Plugins.link(\"plugin name\");", "contents": "Plugins.link(\"$1.dll\");\n$0" }, | |
{ "trigger": "trycatch \t ", "contents": "try {\n $1\n} catch (e) {\n $2\n}" }, | |
{ "trigger": " \t ", "contents": "" }, | |
{ "trigger": " \t ", "contents": "" }, | |
{ "trigger": " \t ", "contents": "" }, | |
"function","length","System", "Storages","global","void","extends","super","finalize","typeof","return","final","const","int","real","string","Window","true", "false","new","visible", | |
"width", "height", | |
"innerWidth", "innerHeight", | |
"1280", "720", "1920", "1080", | |
"left", "top", "right", "bottom", | |
"screenWidth", "screenHeight", | |
"caption", "title", | |
"primaryLayer", | |
"this", "null", | |
"imageWidth", "imageHeight", | |
"font","face","timer","Timer","interval","enabled","action","target","type", | |
"WaveSoundBuffer", | |
"jpg", "jpeg", "png", "bmp", "wav", | |
"VK_P", "VK_S", "mbLeft", "mbRight", "mbMiddle", "ssAlt", "ssShift", "ssCtrl", "ssRepeat", "status", | |
"MenuItem","shortcut", | |
"Shift","Alt","Esc","Enter", | |
"F1","F2","F3","F4","F5","F6","F7","F8","F9","F10","F11","F12", | |
"" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment