参考文章

参考文章

配置

文件 --> 首选项 --> 配置用户代码片段 --> markdown.json

我的配置

markdown.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
{
// Place your snippets for markdown 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"
// }
"插入行内文本样式": {
"prefix": "文本",
"body": ["{% ${1|下划线,着重号,波浪线,删除线,按键,密码|} ${2:文本内容} %} $0"],
"description": "插入文本样式如:下划线,着重号,波浪线,删除线,按键,密码"
},
"插入行内文本": {
"prefix": "行",
"body": [
"{% 行 ${1|手写,黑体,楷体,宋体|} ${2|红色,黄色,绿色,青色,蓝色,灰色|} ${3|1,2,3,4,5,6,7,8|} ${4|居左,居中,居右|}, ${5:文本内容} %} $0"
],
"description": "插入行内文本"
},
"插入段落文本": {
"prefix": "段",
"body": [
"{% 段 ${1|手写,黑体,楷体,宋体|} ${2|红色,黄色,绿色,青色,蓝色,灰色|} ${3|1,2,3,4,5,6,7,8|} ${4|居左,居中,居右|}, ${0:文本内容} %}"
],
"description": "插入段落文本"
},
"插入上标标签": {
"prefix": "上标",
"body": [
"{% 上标 ${1|信息,正确,错误,警告,突然,禁止,家,循环,钥匙,提醒|} %}",
"${0:文本内容}",
"{% end上标 %}"
],
"description": "插入上标标签"
},
"插入上标动画标签": {
"prefix": "上标动画",
"body": [
"{% 上标 ${1|信息,正确,错误,警告,突然,禁止,家,循环,钥匙,提醒|}, ${2|faa-wrench,faa-ring,faa-horizontal,faa-vertical,faa-flash,faa-bounce,faa-spin,faa-tada,faa-pulse,faa-shake,faa-passing,faa-passing-reverse,faa-burst,faa-falling,faa-rising,faa-parent|} ${3|animated,animated-hover|} ${4|faa-fast,faa-slow|} %}",
"${0:文本内容}",
"{% end上标 %}"
],
"description": "插入上标动画标签"
},
"插入复选列表": {
"prefix": "复选",
"body": "{% 复选 ${1|v,+,-,x|} ${2|红色,黄色,绿色,青色,蓝色|} ${3|手写,黑体,楷体,宋体|}, ${0:文本内容} %}",
"description": "插入复选列表"
},
"插入单选列表": {
"prefix": "单选",
"body": "{% 单选 ${1:v} ${2|红色,黄色,绿色,青色,蓝色|} ${3|手写,黑体,楷体,宋体|}, ${0:文本内容} %}",
"description": "插入单选列表."
},
"插入链接卡片": {
"prefix": "链接",
"body": "{% 链接 ${1:标题}, ${2:链接}, ${0:图片链接(可选)} %}",
"description": "插入链接卡片."
},
"插入按钮": {
"prefix": "按钮",
"body": "{% 按钮 ${1:标题}, ${2:链接}, ${0:图片链接(可选)} %}",
"description": "插入按钮."
},
"插入按钮组": {
"prefix": "按钮组",
"body": [
"{% 按钮组 ${1|方,圆|} ${2|2格,3格,4格,5格|} ${3|宽,填充,居中,居中分散|} %}",
"$0",
"{% end按钮组 %}"
],
"description": "插入按钮组."
},
"插入GitHub徽标": {
"prefix": "徽标",
"body": "{% 徽标 ${1:徽标左边的信息(必选)},${2:右边的信息(必选)},${3:徽标图标}||${4:徽标右边的颜色},${5:链接},${6:徽标的额外信息}||${7:自定义参数} %} $0",
"description": "插入GitHub徽标."
},
"插入网站卡片组": {
"prefix": "网站组",
"body": [
"{% 网站组 %}",
"$0",
"{% end网站组 %}"
],
"description": "插入网站卡片组."
},
"插入网站卡片": {
"prefix": "网站",
"body": "{% 网站 ${1:标题}, 链接='${2:链接}', 背景='${3:截图链接}', 头像='${4:头像链接(可选)}', 描述='${0:描述(可选)}' %}",
"description": "插入网站卡片."
},
"插入行内图片": {
"prefix": "行内图",
"body": "{% 行内图 ${1:图片链接}, 高='${2:高度px(可选)}' %} $0",
"description": "插入行内图片."
},
"插入单张图片": {
"prefix": "图片",
"body": "{% 图片 ${1:图片链接}, 宽='${2:宽度px(可选)}', 高='${3:高度px(可选)}', 描述='${4:描述(可选)}', 背景='${0:占位颜色(可选#1D0C04)}' %}",
"description": "插入单张图片."
},
"插入音频": {
"prefix": "音频",
"body": "{% 音频 ${1:音频链接} %} $0",
"description": "插入音频."
},
"插入视频组": {
"prefix": "视频组",
"body": [
"{% 视频组 ${1|1,2,3,4|} %}",
"$0",
"{% end视频组 %}"
],
"description": "插入视频组."
},
"插入视频": {
"prefix": "视频",
"body": [
"{% 视频 ${1:视频链接} %}",
"$0"
],
"description": "插入视频."
},
"插入折叠框": {
"prefix": "折叠",
"body": [
"{% 折叠 ${1:打开} ${2|红色,黄色,绿色,青色,蓝色|}, ${3:标题(可选)} %}",
"${0:文本内容}",
"{% end折叠 %}"
],
"description": "插入折叠框."
},
"插入诗词标签": {
"prefix": "诗词",
"body": [
"{% 诗词 ${1:诗词标题}, ${2:作者}, ${3|手写,黑体,楷体,宋体|} %}",
"${0:诗词内容}",
"{% end诗词 %}"
],
"description": "插入诗词标签."
},
"插入阿里图标": {
"prefix": "阿里图标",
"body": "{% 阿里图标 ${1:icon-图标名称}, ${2:图标大小如:1} %} $0",
"description": "插入阿里图标."
},
"插入进度条": {
"prefix": "进度条",
"body": "{% 进度条 ${1:进度(0到100)} ${2|红色,黄色,绿色,青色,蓝色,灰色|} ${0:文本内容} %}",
"description": "插入进度条."
},
"插入注释": {
"prefix": "注释",
"body": "{% 注释 ${1:注释词汇},'${2:注释内容}' %} $0",
"description": "插入注释."
},
"插入气泡注释": {
"prefix": "气泡注释",
"body": "{% 气泡注释 ${1:注释词汇},'${2:悬停显示的注解内容}','${3:可选,气泡背景色.默认为\"#71a4e3\"}' %} $0",
"description": "插入气泡注释."
},
"插入引用文献": {
"prefix": "引用文献",
"body": [
"{% 引用 '[${1:上标序号id}]','${2:引用的参考文献名称}' %} $0",
"{% 文献 '[${1:上标序号id}]','${2:引用的参考文献名称}','${3:引用的参考文献链接(可省略)}' %}"
],
"description": "插入引用文献."
},
"插入旋转相册": {
"prefix": "旋转相册",
"body": [
"{% 旋转相册 '${1:相册唯一ID,用于监测相册鼠标动作.禁止使用中文}','${2:相册中间显示的内容}' %}",
"${0:![](/img/1.jpg)}",
"{% end旋转相册 %}"
],
"description": "插入旋转相册."
},
"插入分栏组": {
"prefix": "分栏组",
"body": ["{% 分栏组 ${1:将在#id中用作每个标签及其索引号的前缀}, ${2:活动选项卡的索引号} %}",
"$0",
"{% end分栏组 %}"
],
"description": "插入分栏组"
},
"插入分栏": {
"prefix": "分栏",
"body": [
"<!-- 分栏 ${1:分栏标题}${2:@}${3:icon} -->",
"${0:文本内容}",
"<!-- end分栏 -->"
],
"description": "插入分栏"
},
"插入图库组": {
"prefix": "图库组",
"body": ["{% 图库组 %}",
"$0",
"{% end图库组 %}"
],
"description": "插入图库组"
},
"插入图库": {
"prefix": "图库",
"body": ["{% 图库 '${1:图库名称}' '${2:图库描述}' '${3:链接到对应相册的地址}' '${4:图库封面图片链接}' %}",
"$0"
],
"description": "插入图库."
},
"插入相册": {
"prefix": "相册",
"body": ["{% 相册 '${1:url,}' '${2:远程拉取json链接}' %}",
"${0:![](/img/1.jpg)}",
"{% end相册 %}"
],
"description": "插入相册."
},
"插入时间轴": {
"prefix": "时间轴",
"body": [
"{% 时间轴 ${1:标题/时间线}, ${2|default,blue,pink,red,purple,orange,green|} %}",
"$0",
"{% end时间轴 %}"
],
"description": "插入时间轴"
},
"插入时间轴 时间": {
"prefix": "时间",
"body": ["<!-- 时间 ${1:时间节点(标题)} -->",
"${0:文本内容}",
"<!-- end时间 -->"
],
"description": "插入时间轴 时间"
},
"插入饼图": {
"prefix": "饼图",
"body": ["{% 画图 %}",
"pie title ${1:标题}",
" \"${2:元素1}\" : ${3:数值}",
" \"${4:元素2}\" : ${5:数值}",
" \"${6:元素3}\" : ${7:数值}",
" \"${8:元素4}\" : ${9:数值}",
" $0",
"{% end画图 %}"
],
"description": "插入饼图."
},
"插入流程图": {
"prefix": "流程图",
"body": ["{% 画图 %}",
"flowchart ${1|TD,LR|}",
" A[如果] --> B{是否等于}",
" B -->|Yes| C[是]",
" C --> D[等于]",
" D --> B",
" B --->|NO| E[否]",
" E --> F[不等于]",
" B ----> G[未知]",
" $0",
"{% end画图 %}"
],
"description": "插入流程图."
},
"插入时序图": {
"prefix": "时序图",
"body": ["{% 画图 %}",
"sequenceDiagram",
" actor 爱丽丝",
" actor 鲍勃",
" 爱丽丝->>鲍勃: 嗨,鲍勃",
" 鲍勃->>爱丽丝: 嗨,爱丽丝",
" $0",
"{% end画图 %}"
],
"description": "插入时序图."
},
"插入思维导图": {
"prefix": "思维导图",
"body": ["{% 画图 %}",
"mindmap",
" root(${1:(Hexo博客搭建)})",
" 框架",
" Hexo",
" ::icon(fa-brands fa-phoenix-framework)",
" 基础配置",
" _config.yml",
" 环境",
" Git",
" ::icon(fab fa-git)",
" Node.js 12.0<br/>及以上版本",
" ::icon(fab fa-node)",
" 主题",
" 🦋Butterfly",
" 基础配置",
" _config.butterfly.yml",
" 魔改",
" Akilarの糖果屋<br/>Akilar.top",
" 工具",
" 电脑",
" ::icon(fas fa-laptop-code)",
" $0",
"{% end画图 %}"
],
"description": "插入思维导图."
},
"插入XY图表": {
"prefix": "XY图表",
"body": ["{% 画图 %}",
"xychart-beta ${1|vertical,horizontal|}",
" title \"${2:标题}\"",
" x-axis [\"${3:一月}\",\"${4:二月}\",\"${5:三月}\",\"${6:四月}\",\"${7:五月}\",\"${8:六月}\",\"${9:七月}\",\"${10:八月}\",\"${11:九月}\",\"${12:十月}\",\"${13:十一月}\",\"${14:十二月}\"]",
" y-axis \"${15:收入(元)}\" ${16:4000} --> ${17:11000}",
" bar [${18:5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000}]",
" line [${19:5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000}]",
"{% end画图 %}"
],
"description": "插入XY图表."
},
"插入友链组": {
"prefix": "友链组",
"body": ["{% 友链组 %}",
"{% 友链 ${1:名称}, 链接='${2:链接}', 背景='${3:背景}', 头像='${4:头像}', 描述='${5:描述}' %}",
"$0",
"{% end友链组 %}"
],
"description": "插入友链组."
},
"插入友链": {
"prefix": "友链",
"body": ["{% 友链 ${1:名称}, 链接='${2:链接}', 背景='${3:背景}', 头像='${4:头像}', 描述='${5:描述}' %}",
"$0",
],
"description": "插入友链."
},
"插入表格": {
"prefix": "表格",
"body": ["||||",
"| ${1::}--${2::} | ${1::}--${2::} | ${1::}--${2::} |",
"||||",
"||||",
"||||",
"||||",
"||||",
"$0",
],
"description": "插入表格."
}
}

没有生效?

修改路径 C:\Users\用户名\AppData\Roaming\Code\User\settings.json 文件

1
2
3
4
5
6
7
8
9
10
11
"[markdown]": {
"editor.unicodeHighlight.ambiguousCharacters": false,
"editor.unicodeHighlight.invisibleCharacters": false,
"diffEditor.ignoreTrimWhitespace": false,
"editor.wordWrap": "on",
"editor.quickSuggestions": {
"comments": "off",
"strings": "off",
"other": "on"
}
},
  • "other": "off" 改为 "other": "on" 就可以了