当前位置:网站首页>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 + pCall up the following window , And typesnippets

The second step :json File editing
- Customize
jsNote as an example

- Enter into
javascript.jsonAfter 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 . prefixThe content in the can be customizedphp、ts、cssAnd 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
jsxNotes , 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 commentsjsonfile , Just configure it in the global context .

- The content in the global code fragment is as follows
- and
jsThere is no difference between , holdjsChanged 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
边栏推荐
猜你喜欢
随机推荐
SQL sorts according to the specified content
GDAL+OGR学习
Export the articles written in CSDN to PDF format
从源代码到可执行文件的过程
Rust 中的 Cell 共享可变指针
非参数化相机畸变模型简介
The most practical chrome plug-in
Basemap库绘制地图
[leetcode 6] zigzag transformation
Conversion between JS object and string
Record the installation and configuration of gestermer on TX2, and then use GST RTSP server
7-21日错题涉及知识点。
程序設計訓練
ArcGIS license错误-15解决方法
-- SQL query and return limit rows
MySQL table constraints and table design
渔网道路密度计算
Flask操作多个数据库
[leetcode 150] evaluation of inverse Polish expression
Cf515b drazil and his happy friends









