当前位置:网站首页>Vscode custom comments
Vscode custom comments
2022-04-23 06:35:00 【Fan Ke】
vscode As a tool for everyone's daily development , I won't say much more .
Importance of notes , In development, it can be said to be the top priority , And personalized custom notes , It can greatly improve our project development .
First step : Command Panel
- Use
ctrl + shift + p
Call up the following window , And typesnippets
The second step :json File editing
- Customize
js
Note as an example
- Enter into
javascript.json
After in file , Add the following code , You can customize the design , Save to exit , Here is a class annotation A method comment - Then, you can enter in the above of the method
des
, You can generate the comments you want . prefix
The content in the can be customizedphp
、ts
、css
And so on.
"Print to js class": {
"prefix": "des",
"body": [
"/*",
" * author : author ",
" * Time : ${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE} ${CURRENT_HOUR}:${CURRENT_MINUTE}:${CURRENT_SECOND}",
" * function : $0",
" */"
],
},
"Print to js method": {
"prefix": "des",
"body": [
"/*",
" * author : author ",
" * Time : ${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE} ${CURRENT_HOUR}:${CURRENT_MINUTE}:${CURRENT_SECOND}",
" * function : $0",
" */"
],
},
Add
- I don't know if I didn't find , It's still about the version , I can't find it
jsx
Notes , But in js The configuration inside doesn't take effect . I tried to set it in the global code fragment , It works , If you don't find itjsx
, Or you need your own commentsjson
file , Just configure it in the global context .
- The content in the global code fragment is as follows
- and
js
There is no difference between , holdjs
Changed tojsx
"Print to jsx class": {
"prefix": "des",
"body": [
"/*",
" * author : author ",
" * Time : ${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE} ${CURRENT_HOUR}:${CURRENT_MINUTE}:${CURRENT_SECOND}",
" * function : $0",
" */"
],
},
"Print to jsx method": {
"prefix": "des",
"body": [
"/*",
" * author : author ",
" * Time : ${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE} ${CURRENT_HOUR}:${CURRENT_MINUTE}:${CURRENT_SECOND}",
" * function : $0",
" */"
],
},
版权声明
本文为[Fan Ke]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204210614037361.html
边栏推荐
猜你喜欢
随机推荐
[leetcode 67] sum of two binary numbers
St table template
非参数化相机畸变模型简介
clion安装教程
[leetcode169] most elements
Option的正确打开方式
批量导出Arcgis属性表
Explanation of the second I interval of 2020 Niuke summer multi school training camp
GDB debugger installation and use
线程和进程的关系和区别是什么
Substring Inversion (Easy Version)
大学概率论与数理统计知识点详细整理
[leetcode 150] evaluation of inverse Polish expression
渔网道路密度计算
[leetcode 954] double pair array
安全授信
Storing inherited knowledge in cloud computing
Rust 的多线程安全引用 Arc
爬取蝉妈妈数据平台商品数据
Object转Json差异之Gson fastJson jackson 修改字段名