我的用户代码片段 (c & c++)

c

{
    // Place your snippets for c here. Each snippet is defined under a snippet name and has a prefix, body and
    // description. 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:
    // "Print to console": {
    // 	"prefix": "log",
    // 	"body": [
    // 		"console.log('$1');",
    // 		"$2"
    // 	],
    // 	"description": "Log output to console"
    // }
    "Print to conaole": {
        "prefix": "c_template",
        "body": [
            "#include <stdio.h>",
            "#include <string.h>",
            "#include <memory.h>",
            "#include <time.h>",
            "int main()",
            "{",
            "   // freopen(\"D://yeun//Study//Project//IDE//VScode_test//data.txt\", \"r\", stdin);",
            "   $0",
            "   return 0;",
            "}",
            "",
        ],
        "description": "A c file template."
    }
}

c++

{
    // Place your snippets for cpp here. Each snippet is defined under a snippet name and has a prefix, body and
    // description. 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:
    // "Print to console": {
    // 	"prefix": "log",
    // 	"body": [
    // 		"console.log('$1');",
    // 		"$2"
    // 	],
    // 	"description": "Log output to console"
    // }
    "Print to conaole": {
        "prefix": "cpp_template",
        "body": [
            "#include <bits/stdc++.h>",
            "using namespace std;",
            "int main()",
            "{",
            "    // freopen(\"D://yeun//Study//Project//IDE//VScode_testc//data.txt\", \"r\", stdin);",
            "    $0",
            "    return 0;",
            "}",
            "",
        ],
        "description": "A cpp file template."
    }
}
发布了30 篇原创文章 · 获赞 43 · 访问量 10万+

猜你喜欢

转载自blog.csdn.net/qq_43041976/article/details/88945142
今日推荐