Geração de fragmento de Markdown personalizado VsCode, matriz, cor da fonte, etc.

Primeiro, abra o arquivo settings.json novamente

  • Pressione ctrl + shift + p e digite settings.json. Encontre este arquivo
  • Configure o seguinte código
"[markdown]": {
    
    
    "editor.formatOnSave": true,
    "editor.renderWhitespace": "all",
    "editor.quickSuggestions": {
    
    
        "other": true,
        "comments": true,
        "strings": true
    },
    "editor.acceptSuggestionOnEnter": "on"
}

Em segundo lugar, configure o arquivo markdown.json

  • Abra Editor> Arquivo> Preferências> Snippet de código do usuário> Selecione o idioma de marcação na caixa suspensa e insira markdown.json

  • Como configurar, existem instruções em inglês, a seguir estão as instruções e exemplos em chinês


"con": {
    
     //输入con就会进行提示
    "prefix": "console", //面板修正
    "body": [
        "console.log($1);",// ""这个里面是回车后的主体,$1是光标第一次停留位置,$2是光标第二次停留位置,使用tab进行切换。当然你也可以设置$3,$4。。。。。。。
        "$2"
    ],
    "description": "console.log" //描述提示
},

Três, configuração pessoal

  • Configurado com geração de rótulo de quatro cores de fonte de vermelho, amarelo, azul e verde,
    como combinação ftb: azul

  • Configure o rótulo do tamanho da fonte para gerar a
    combinação fts: fonte

  • Configure a tag de estilo de fonte para gerar
    combinação de ftf: estilo de fonte

  • Configure a matriz para gerar a
    combinação jleft:
    A = {abcdef} \ left \ {\ begin {matrix} a & b & c \\ d & e & f \ end {matrix} \ right \}{ umadbecf}

  • Configure o determinante para gerar
    combinações de hleft:
    ∣ abcdef ∣ \ left | \ begin {array} {lcr} a & b & c \\ d & e & f \ end {array} \ right ||umadbecf|

  • Configure a matriz omitida para gerar
    combinações de sleft:
    A = {ab… efg… j ⋮ ⋮ ⋱ ⋮ pq… t} \ left \ {\ begin {matrix} a & b & \ cdots & e \\ f & g & \ cdots & j \\ \ vdots & \ vdots & \ ddots & \ vdots \\ p & q & \ cdots & t \ end {matrix} \ right \}umafpbgqejt

  • Configure a geração de destaque de idioma
    , como combinação c:
  //c语言

  • Configurar geração de sobrescrito e subscrito
    Superior: sup
    hhhh tm

    Parte inferior: sub
    H 2 O

{
  "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"
  },}

Acho que você gosta

Origin blog.csdn.net/qq_45549336/article/details/109250332
Recomendado
Clasificación