一、再打开settings.json文件
- 按下ctrl+shift+p,输入settings.json。找到这个文件
- 配置下面代码
"[markdown]": {
"editor.formatOnSave": true,
"editor.renderWhitespace": "all",
"editor.quickSuggestions": {
"other": true,
"comments": true,
"strings": true
},
"editor.acceptSuggestionOnEnter": "on"
}
二、进行markdown.json文件的配置
-
打开编辑器>文件>首选项>用户代码片段>下拉框中选中markdown语言,进入markdown.json
-
如何配置,有英文说明,下面是中文说明和例子
"con": {
//输入con就会进行提示
"prefix": "console", //面板修正
"body": [
"console.log($1);",// ""这个里面是回车后的主体,$1是光标第一次停留位置,$2是光标第二次停留位置,使用tab进行切换。当然你也可以设置$3,$4。。。。。。。
"$2"
],
"description": "console.log" //描述提示
},
三、个人的配置
- 配置了红黄蓝绿四种字体颜色标签生成
如ftb组合:蓝色
- 配置字体大小标签生成
fts组合:字体
- 配置字体样式标签生成
ftf组合:字体样式
- 配置矩阵生成
jleft组合:
A= { a b c d e f } \left\{ \begin{matrix}a & b & c \\ d & e & f \end{matrix} \right\} { adbecf}
- 配置行列式生成
hleft组合:
∣ a b c d e f ∣ \left| \begin{array}{lcr}a & b & c \\ d & e & f \end{array} \right| ∣∣∣∣adbecf∣∣∣∣
- 配置带省略的矩阵生成
sleft组合:
A= { a b ⋯ e f g ⋯ j ⋮ ⋮ ⋱ ⋮ p q ⋯ t } \left\{ \begin{matrix}a & b & \cdots & e \\ f & g & \cdots & j \\ \vdots & \vdots & \ddots & \vdots \\ p & q & \cdots & t \end{matrix} \right\} ⎩⎪⎪⎪⎨⎪⎪⎪⎧af⋮pbg⋮q⋯⋯⋱⋯ej⋮t⎭⎪⎪⎪⎬⎪⎪⎪⎫
- 配置语言高亮生成
如c组合:
//c语言
-
配置上角标、下角标生成
上:sup
hhhhtm下:sub
H2O
{
"con": {
"prefix": "console",
"body": [
"console.log($1);",
"$2"
],
"description": "console.log"
},
"`js": {
"prefix": "```javascript",
"body": [
"```javascript $1```", "$2"
],
"description": "```javascript```"
},
"`css": {
"prefix": "```css",
"body": [
"```css $1```", "$2"
],
"description": "```css```"
},
"`h": {
"prefix": "```html",
"body": [
"```html $1```", "$2"
],
"description": "```html```"
},
"`c": {
"prefix": "```c",
"body": [
"```c $1```", "$2"
],
"description": "```c```"
},
"`cp": {
"prefix": "```cpp",
"body": [
"```cpp $1```", "$2"
],
"description": "```cpp```"
},
"sub": {
"prefix": "sub",
"body": [
"<sub>$1</sub>", "$2"
],
"description": "<sub>$1</sub>"
},
"sup": {
"prefix": "sup",
"body": [
"<sup>$1</sup>", "$2"
],
"description": "<sup></sup>"
},
"ft": {
"prefix": "font",
"body": [
"<font color= $1 size=$2 face='$3'>$4</font>", "$5"
],
"description": "<font></font>"
},
"ftc": {
"prefix": "ftc",
"body": [
"<font color= $1>$2</font>", "$3"
],
"description": "<font></font>"
},
"ftr": {
"prefix": "fontred",
"body": [
"<font color=#e84118>$1</font>", "$2"
],
"description": "<font color=red></font>"
},
"ftb": {
"prefix": "fontblue",
"body": [
"<font color=#00a8ff>$1</font>", "$2"
],
"description": "<font color=blue></font>"
},
"ftg": {
"prefix": "fontgreen",
"body": [
"<font color=#4cd137>$1</font>", "$2"
],
"description": "<font color=green></font>"
},
"fty": {
"prefix": "fontyellow",
"body": [
"<font color=#fbc531>$1</font>", "$2"
],
"description": "<font color=yellow></font>"
},
"fts": {
"prefix": "fts",
"body": [
"<font size= $1>$2</font>", "$3"
],
"description": "<font></font>"
},
"ftf": {
"prefix": "ftf",
"body": [
"<font face= $1>$2</font>", "$3"
],
"description": "<font></font>"
},
"hleft": {
"prefix": "hleft|",
"body": [
"$\\left| \\begin{array}{lcr}a & b & c \\\\\\ d & e & f \\end{array} \\right|$"
],
"description": "hleft"
},
"jleft": {
"prefix": "jleft{",
"body": [
"A= $\\left\\{ \\begin{matrix}a & b & c \\\\\\ d & e & f \\end{matrix} \\right\\\\}$"
],
"description": "jleft"
},
"slefs": {
"prefix": "sleft{",
"body": [
"A= $\\left\\{ \\begin{matrix}a & b & \\cdots & e \\\\\\ f & g & \\cdots & j \\\\\\ \\vdots & \\vdots & \\ddots & \\vdots \\\\\\ p & q & \\cdots & t \\end{matrix} \\right\\\\}$"
],
"description": "sleft"
},
"br": {
"prefix": "br",
"body": [
"<br>"
],
"description": "br"
},}