vscod 配置 morkdown 快捷键

发布时间 2023-09-07 17:30:59作者: 这么拼都不秃

vscod 配置 morkdown 快捷键

  • ✅1、首先在根目录添加.vscode 文件夹

    • ♻️1.1 新建一个 settings.json 文件
    {
      "[markdown]": {
        "editor.formatOnSave": true,
        "editor.renderWhitespace": "all",
        "editor.quickSuggestions": {
          "other": true,
          "comments": true,
          "strings": true
        },
        "editor.acceptSuggestionOnEnter": "on"
      }
    }
    
    • ♻️1.2 新建一个 markdown.code-snippets 文件
    {
      // 语法参考: https://code.visualstudio.com/docs/editor/userdefinedsnippets
      "绿色字体": {
        "prefix": "f-g",
        "body": ["<font color=green>${TM_SELECTED_TEXT:0}</font>"]
      },
      "红色字体": {
        "prefix": "f-r",
        "body": ["<font color=red>$0</font>"]
      },
      "黄色字体": {
        "prefix": "f-y",
        "body": ["<font color=yellow>$0</font>"]
      },
      "蓝色字体": {
        "prefix": "f-b",
        "body": ["<font color=blue>$0</font>"]
      },
      "高亮提示": {
        "prefix": "hl",
        "body": [
          "<span style=\"background-color:${1|#2e74ff1a ,#00a6691a ,#ff8d191a|} ;font-size:14px; color:${2|#2e74ff,#00a669,#ff8d19|}; padding:6px;border-radius:5px;\">${3:文本}</span>"
        ],
        "description": "高亮提示"
      },
      "横线": {
        "prefix": "ll",
        "body": ["<hr/>"]
      },
      "块": {
        "prefix": "bb",
        "body": ["> $0"]
      },
      "js代码块": {
        "prefix": "js",
        "body": ["```js", " $0", "```"]
      },
      "json代码块": {
        "prefix": "json",
        "body": ["```json", " $0", "```"]
      },
      "java代码块": {
        "prefix": "java",
        "body": ["```java", " $0", "```"]
      },
      "python代码块": {
        "prefix": "py",
        "body": ["```python", " $0", "```"]
      },
      "center": {
        "prefix": "center",
        "body": ["<center>$0</center>"]
      },
      "标题": {
        "prefix": "main",
        "body": ["## <center>$0</center>"]
      },
      "一级列表": {
        "prefix": "l1",
        "body": ["- 1.$0", "- 2.", "- 3."],
        "description": "一级列表"
      },
      "二级列表": {
        "prefix": "l2",
        "body": [
          "- 1、$0",
          "   - 1.1",
          "   - 1.2",
          "   - 1.3",
          "- 2、",
          "   - 2.1",
          "   - 2.2",
          "   - 2.3",
          "- 3、",
          "   - 3.1",
          "   - 3.2",
          "   - 3.3"
        ],
        "description": "二级列表"
      },
      "三级列表": {
        "prefix": "l3",
        "body": [
          "- 1、$0",
          "   - 1.1",
          "       - 1.1.1",
          "       - 1.1.2",
          "   - 1.2",
          "       - 1.2.1",
          "       - 1.2.2",
          "   - 1.3",
          "       - 1.3.1",
          "       - 1.3.2",
          "- 2、",
          "   - 2.1",
          "       - 2.1.1",
          "       - 2.1.2",
          "   - 2.2",
          "       - 2.2.1",
          "       - 2.2.2",
          "   - 2.3",
          "       - 2.3.1",
          "       - 2.3.2",
          "- 3、",
          "   - 3.1",
          "       - 3.1.1",
          "       - 3.1.2",
          "   - 3.2",
          "       - 3.2.1",
          "       - 3.2.2",
          "   - 3.3",
          "       - 3.3.1",
          "       - 3.3.2"
        ],
        "description": "三级列表"
      },
      "四级列表": {
        "prefix": "l4",
        "body": [
          "- 1、$0",
          "   - 1.1",
          "       - 1.1.1",
          "           - 1.1.1.1",
          "           - 1.1.1.2",
          "       - 1.1.2",
          "           - 1.1.2.1",
          "           - 1.1.2.2",
          "   - 1.2",
          "       - 1.2.1",
          "           - 1.2.1.1",
          "           - 1.2.1.2",
          "       - 1.2.2",
          "           - 1.2.2.1",
          "           - 1.2.2.2",
          "   - 1.3",
          "       - 1.3.1",
          "           - 1.3.1.1",
          "           - 1.3.1.2",
          "       - 1.3.2",
          "           - 1.3.2.1",
          "           - 1.3.2.2",
          "- 2、",
          "   - 2.1",
          "       - 2.1.1",
          "           - 2.1.1.1",
          "           - 2.1.1.2",
          "       - 2.1.2",
          "           - 2.1.2.1",
          "           - 2.1.2.2",
          "   - 2.2",
          "       - 2.2.1",
          "           - 2.2.1.1",
          "           - 2.2.1.2",
          "       - 2.2.2",
          "           - 2.2.2.1",
          "           - 2.2.2.2",
          "   - 2.3",
          "       - 2.3.1",
          "           - 2.3.1.1",
          "           - 2.3.1.2",
          "       - 2.3.2",
          "           - 2.3.2.1",
          "           - 2.3.2.2",
          "- 3、",
          "   - 3.1",
          "       - 3.1.1",
          "           - 3.1.1.1",
          "           - 3.1.1.2",
          "       - 3.1.2",
          "           - 3.1.2.1",
          "           - 3.1.2.2",
          "   - 3.2",
          "       - 3.2.1",
          "           - 3.2.1.1",
          "           - 3.2.1.2",
          "       - 3.2.2",
          "           - 3.2.2.1",
          "           - 3.2.2.2",
          "   - 3.3",
          "       - 3.3.1",
          "           - 3.3.1.1",
          "           - 3.3.1.2"
        ]
      }
    }
    
    • ♻️1.3 可以借助第三档插件 Markdown Preview Enhanced 通过右键来预览效果

    我设置的快捷键说明文档在这里:
    https://www.cnblogs.com/gjzsa/p/17685350.html

    需要更多格式可以留言说明!!!