VSCode Snippets
{
// 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"
// }
"HEADER": {
"prefix": "cheader",
"body": [
"/*",
"* (C) COPYRIGHT NBI Limited",
"* ALL RIGHT RESERVED",
"*",
"* File : $RELATIVE_FILEPATH",
"* Authors : dzhang",
"* Create Time : $CURRENT_YEAR/$CURRENT_MONTH/$CURRENT_DATE $CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND",
"* Description :",
"*",
"*/",
"",
],
},
"HHEADER": {
"prefix": "hheader",
"body": [
"/*",
"* (C) COPYRIGHT NBI Limited",
"* ALL RIGHT RESERVED",
"*",
"* File : ${RELATIVE_FILEPATH}",
"* Authors : dzhang",
"* Create Time : $CURRENT_YEAR/$CURRENT_MONTH/$CURRENT_DATE $CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND",
"* Description :",
"*",
"*/",
"",
"#ifndef __${RELATIVE_FILEPATH/([a-zA-Z0-9]+)([\\/\\.-_])?/${1:/upcase}_/g}__",
"#define __${RELATIVE_FILEPATH/([a-zA-Z0-9]+)([\\/\\.-_])?/${1:/upcase}_/g}__",
"$0",
"#endif // __${RELATIVE_FILEPATH/([a-zA-Z0-9]+)([\\/\\.-_])?/${1:/upcase}_/g}__"
],
}
}
{
// Place your snippets for python 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"
// }
"Add file info in the beginning": {
"prefix": "fileinfo",
"body": [
"# -*- coding: utf-8 -*-",
"\"\"\"",
" > File Name: ${TM_FILENAME}",
" > Author: dzhang",
" > Created Time: ${CURRENT_MONTH}/${CURRENT_DATE}/${CURRENT_YEAR_SHORT} ${CURRENT_HOUR}:${CURRENT_MINUTE}:${CURRENT_SECOND}",
" > Description:",
"\"\"\"",
],
"description": "Add file header"
}
}
版权声明:本文为qq_32435729原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。