您的位置 >>> 星想互联 >>> 编程技术 >>> PHP基础
vs code常用代码片断
点击数:1424  发布时间2018-12-08 21:16:07
{
// Place your global snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and 
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope 
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is 
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are: 
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. 
// Placeholders with the same ids are connected.
// Example:

"php": {
"prefix": "php", // 触发的关键字 输入php按下tab键
"body": [
"<?php",
"$1",
"?>",
],
"description": "php components"
},

"rs?": {
"prefix": "rs?", // 触发的关键字 输入rs?按下tab键
"body": [
"<?php echo $$rs['$1']?>",
],
"description": "rs? components"
},

"rs": {
"prefix": "rs", // 触发的关键字 输入rs按下tab键
"body": [
"echo $$rs['$1'];",
],
"description": "rs components"
},

"v": {
"prefix": "v", // 触发的关键字 输入v按下tab键
"body": [
"echo $$v['$1'];",
],
"description": "v components"
},

"ec": {
"prefix": "ec", // 触发的关键字 输入ec按下tab键
"body": [
"<?php echo $1 ?>",
],
"description": "ec components"
},

"fo": {
"prefix": "fo", // 触发的关键字 输入fo按下tab键
"body": [
"foreach($$rs as $$v){",
"$1",
"}",
],
"description": "fo components"
},

}





来源:咸宁网站建设