{
"main function": {
"prefix": "q",
"body": [
"/********************************************************************************",
"* Description: $1 q/pr/sc/wh/fo/sw/ad",
"********************************************************************************/",
"# include <stdio.h>",
"# include <unistd.h>",
"int main(void)",
"{",
" $0",
" system(\"pause\");",
" return 0;",
"}"
],
"description": "main function"
},
"printf function": {
"prefix": "pr",
"body": [
"printf(\"$1 \\n\", $2);$0"
],
"description": "printf function"
},
"scanf function": {
"prefix": "sc",
"body": [
"scanf(\"$1\", &$2);$0"
],
"description": "scanf function"
},
"while function": {
"prefix": "wh",
"body": [
"while($1)",
"{",
" $0",
"}"
],
"description": "while function"
},
"fo function": {
"prefix": "fo",
"body": [
"for(int i=0; i<$1; i++)",
"{",
"\t$2",
"}",
"$0"
],
"description": "fo function"
},
"Switch statement" :{
"prefix": "sw",
"body": [
"switch($1)",
"{",
"case $2 :$3;",
"\tbreak;",
"case $4 :$5;",
"\tbreak;",
"case $6 :$7;",
"\tbreak;",
"default:$8;",
"\tbreak;",
"}",
"$0"
],
"description": "Switch statement"
},
"ADD COMMENT":{
"prefix": "ad",
"body": [
"/************** $1 **************/"
],
"description": "添加/**/型注释"
}
}
|