标签:body snippet console 函数 vscode 注释 prefix 2021
1.打开配置
2.格式如下:
此类注释实际使用的是一种打印输出:
文件中有实例说明,这不光可以配置注释还可以配置for,while以及switch等,需要自定义的函数。(注意文件类型的对应的关系,c.json
仅适用于c,c++.json又需要进行配置)
{
// 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"
// }
"HEADER": {
"prefix": "header",
"body": [
"/***********************************************************************************************************************",
"@! Copyright(c) 2014-2021 Shenzhen Siliconductor Co.Ltd.All rights reserved",
"@File: hal_rf.h",
"@Brief: RF driver header file",
"@Details:",
"@Author: xxx",
"@Version: V1.0.0",
"@Date: 2021-10-27",
"@Warning:",
"@Change Logs:",
"@Date Author Notes",
"@2021-10-27 xxxx the first version",
"***********************************************************************************************************************/",
"$0"
],
},
"function": {
"prefix": "function",
"body": [
"/***********************************************************************************************************************",
"@brief: -- Initialize GPADC",
"@param: -> none",
"@retval: -< none",
"***********************************************************************************************************************/",
"$0"
],
}
}
3.演示:
这里都是在c文件下,才会有提示。更换文件类型就不会再有提示,即在.h文件等其他类型的文件下不会出现提示。
标签:body,snippet,console,函数,vscode,注释,prefix,2021 来源: https://blog.csdn.net/weixin_44386927/article/details/121223125
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。