设置->配置用户代码片段->c(c.json)->填写如下信息 PS: new+回车 自动补全
{
"start c code": {
"prefix": "new",
"body": [
"#include <head.h>\n",
"int main(int argc,const char * argv[])",
"{",
"\t$0", //$0:配置光标停留的位置
"\treturn 0;",
"}",
],
},
"start comment code": {
"prefix": "com",
"body": [
"/*",
"*功能:",
"*参数:",
"*\t@::",
"*返回值:",
"*/"
],
}
}