输入header自行添加H文件宏
{
"C C++ Header": {
"scope": "c, cpp",
"prefix": "header",
"description": "Add #ifndef, #define and #endif",
"body": [
"#ifndef _${TM_FILENAME_BASE/(.*)/${1:/upcase}/}_H_",
"#define _${TM_FILENAME_BASE/(.*)/${1:/upcase}/}_H_",
"",
"$0",
"",
"#endif // ${TM_FILENAME_BASE/(.*)/${1:/upcase}/}_H_",
""
]
}
}
输入h_note自行添加代码分区注释
{
"C C++ Header": {
"scope": "c, cpp",
"prefix": "h_note",
"body": [
"/* Includes ------------------------------------------------------------------*/",
"/* Private constants ---------------------------------------------------------*/",
"/* Private macros ------------------------------------------------------------*/",
"/* Private typedef -----------------------------------------------------------*/",
"/* Private variables ---------------------------------------------------------*/",
"/* Private functions ---------------------------------------------------------*/"
]
}
}
输入h_tag自动添加TAG头
{
"C C++ Header": {
"scope": "c, cpp",
"prefix": "h_tag",
"description": "Add shell tag",
"body": [
"#ifndef TAG",
"#define TAG __func__",
"#endif",
"",
"#ifdef TAG",
"#undef TAG",
"#endif",
""
]
}
}
代码自动生成doxygen注释
安装插件后,在函数上输入 /****/ 后,在第二个星号后敲enter自动生成。