用户代码片段

{


    "Add C include guard": {
        "scope": "c",
        "prefix": "cheader",
        "description": "Add include guard to C header file",
        "body": [
         "// Copyright (c) RealCoolEngineer. $CURRENT_YEAR. All rights reserved.",
         "// Author: beiklive",
         "// Date: $CURRENT_YEAR-$CURRENT_MONTH-$CURRENT_DATE",
         "",
        ]
       },

    "C/C++头文件": {
        "scope": "",
        "prefix": "#iff",
        "body": [
            "// Copyright (c) RealCoolEngineer. $CURRENT_YEAR. All rights reserved.",
            "// Author: beiklive",
            "// Date: $CURRENT_YEAR-$CURRENT_MONTH-$CURRENT_DATE",
            "#ifndef ${RELATIVE_FILEPATH/([a-zA-Z0-9]+)([\\/\\.-_])?/${1:/upcase}_/g}",
            "#define ${RELATIVE_FILEPATH/([a-zA-Z0-9]+)([\\/\\.-_])?/${1:/upcase}_/g}",
            "$1",
            "#endif  // ${RELATIVE_FILEPATH/([a-zA-Z0-9]+)([\\/\\.-_])?/${1:/upcase}_/g}",
            ""
        ],
        "description": "生成预定义宏"
    },
    ".cpp": {
        "prefix": "cc",
        "body": [
            "${TM_FILENAME_BASE}::"
        ],
        "description": "根据文件名生成命名空间名字"
    }

}

评论