atom-nuclide
Version:
A unified developer experience for web and mobile development, built as a suite of features on top of Atom to provide hackability and the support of an active community.
197 lines (196 loc) • 5.92 kB
JSON
{
".source.hack": {
"$GLOBALS['…']": {
"prefix": "globals",
"body": "$GLOBALS['${1:variable}']${2: = }${3:something}${4:;}$0"
},
"?>…<?php": {
"prefix": "php",
"body": "?>$0<?php"
},
"function __construct": {
"prefix": "con",
"body": "function __construct(${1:$${2:foo} ${3:= ${4:null}}}) {\n\t${2:$this->$0 = $$0;}$0\n}"
},
"Heredoc": {
"prefix": "<<<",
"body": "<<<${1:HTML}\n${2:content here}\n$1;\n"
},
"Class Variable": {
"prefix": "doc_v",
"body": "/**\n * ${3:undocumented class variable}\n *\n * @var ${4:string}\n **/\n${1:var} $$2;$0"
},
"Start Docblock": {
"prefix": "/**",
"body": "/**\n * $0\n */"
},
"class …": {
"prefix": "class",
"body": "/**\n * $1\n */\nclass ${2:ClassName} ${3:extends ${4:AnotherClass}}\n{\n\t$5\n\tfunction ${6:__construct}(${7:argument})\n\t{\n\t\t${0:# code...}\n\t}\n}\n"
},
"trait …": {
"prefix": "trait",
"body": "/**\n * $1\n */\ntrait ${2:TraitName}\n{\n\tfunction ${3:functionName}(${4:argument})\n\t{\n\t\t${5:# code...}\n\t}\n}\n"
},
"define(…, …)": {
"prefix": "def",
"body": "define('$1', ${2:'$3'});\n$0"
},
"defined(…)": {
"prefix": "def?",
"body": "$1defined('$2')$0"
},
"do … while …": {
"prefix": "do",
"body": "do {\n\t${0:# code...}\n} while (${1:$a <= 10});"
},
"echo \"…\"": {
"prefix": "echo",
"body": "echo \"${1:string}\";$0"
},
"else …": {
"prefix": "else",
"body": "else {\n\t${0:# code...}\n}"
},
"elseif …": {
"prefix": "elseif",
"body": "elseif (${1:condition}) {\n\t${0:# code...}\n}"
},
"for …": {
"prefix": "for",
"body": "for ($${1:i}=${2:0}; $${1:i} < $3; $${1:i}++) { \n\t${0:# code...}\n}"
},
"foreach …": {
"prefix": "foreach",
"body": "foreach ($${1:variable} as $${2:key} ${3:=> $${4:value}}) {\n\t${0:# code...}\n}"
},
"function …": {
"prefix": "fun",
"body": "${1:public }function ${2:FunctionName}(${3:$${4:value}${5:=''}})\n{\n\t${0:# code...}\n}"
},
"if … else …": {
"prefix": "ifelse",
"body": "if (${1:condition}) {\n\t${2:# code...}\n} else {\n\t${3:# code...}\n}\n$0"
},
"if …": {
"prefix": "if",
"body": "if (${1:condition}) {\n\t${0:# code...}\n}"
},
"$… = ( … ) ? … : …": {
"prefix": "if?",
"body": "$${1:retVal} = (${2:condition}) ? ${3:a} : ${4:b} ;"
},
"include …": {
"prefix": "incl",
"body": "include '${1:file}';$0"
},
"include_once …": {
"prefix": "incl1",
"body": "include_once '${1:file}';$0"
},
"$… = array (…)": {
"prefix": "array",
"body": "$${1:arrayName} = array('$2' => $3${4:,} $0);"
},
"$… = […]": {
"prefix": "shorray",
"body": "$${1:arrayName} = ['$2' => $3${4:,} $0];"
},
"… => …": {
"prefix": "keyval",
"body": "'$1' => $2${3:,} $0"
},
"require …": {
"prefix": "req",
"body": "require '${1:file}';$0"
},
"require_once …": {
"prefix": "req1",
"body": "require_once '${1:file}';$0"
},
"return": {
"prefix": "ret",
"body": "return$1;$0"
},
"return false": {
"prefix": "ret0",
"body": "return false;$0"
},
"return true": {
"prefix": "ret1",
"body": "return true;$0"
},
"switch …": {
"prefix": "switch",
"body": "switch (${1:variable}) {\n\tcase '${2:value}':\n\t\t${3:# code...}\n\t\tbreak;\n\t$0\n\tdefault:\n\t\t${4:# code...}\n\t\tbreak;\n}"
},
"case …": {
"prefix": "case",
"body": "case '${1:variable}':\n\t${0:# code...}\n\tbreak;"
},
"$this->…": {
"prefix": "this",
"body": "$this->$0"
},
"echo $this->…": {
"prefix": "ethis",
"body": "echo $this->$0"
},
"Throw Exception": {
"prefix": "throw",
"body": "throw new $1Exception(${2:\"${3:Error Processing Request}\"}${4:, ${5:1}});\n$0"
},
"while …": {
"prefix": "while",
"body": "while (${1:$a <= 10}) {\n\t${0:# code...}\n}"
}
},
".text.html.php:not(.source)": {
"<?php $this->… ?>": {
"prefix": "this",
"body": "<?php $this->$0 ?>"
},
"<?php echo $this->… ?>": {
"prefix": "ethis",
"body": "<?php echo $this->$0 ?>"
}
},
".text.html.php": {
"<?php … ?>": {
"prefix": "php",
"body": "<?php $0 ?>"
},
"<?php echo … ?>": {
"prefix": "echo",
"body": "<?php echo ${1:$var} ?>$0"
},
"<?php echo htmlentities(…) ?>": {
"prefix": "echoh",
"body": "<?php echo htmlentities(${1:$var}, ENT_QUOTES, 'utf-8'); ?>$0"
},
"<?php else: ?>": {
"prefix": "else",
"body": "<?php else: ?>"
},
"<?php foreach (…) … <?php endforeach ?>": {
"prefix": "foreach",
"body": "<?php foreach ($${1:variable} as $${2:key}${3: => $${4:value}}): ?>\n\t${0}\n<?php endforeach; ?>"
},
"<?php if (…) ?> … <?php else ?> … <?php endif ?>": {
"prefix": "ifelse",
"body": "<?php if (${1:condition}): ?>\n\t$2\n<?php else: ?>\n\t$0\n<?php endif; ?>"
},
"<?php if (…) ?> … <?php endif ?>": {
"prefix": "if",
"body": "<?php if (${1:condition}): ?>\n\t$0\n<?php endif; ?>"
},
"var_dump(\"…\")": {
"prefix": "dump",
"body": "var_dump($1);$0"
},
"PHPDoc function …": {
"prefix": "doc_f",
"body": "/**\n * ${6:undocumented function summary}\n *\n * ${7:Undocumented function long description}\n *\n * @param ${8:type} ${9:var} ${10:Description}\n **/\n${1:public }function ${2:FunctionName}(${3:$${4:value}${5:=''}})\n{\n\t${0:# code...}\n}"
}
}
}