如何自动设置 Markdown 片段触发器 [英] How to set markdown snippet trigger automatically

查看:30
本文介绍了如何自动设置 Markdown 片段触发器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据官方文档,https://code.visualstudio.com/docs/languages/降价

Markdown 代码片段

VS Code 中包含几个内置的 Markdown 片段 -按 Ctrl+Space(触发建议),您将获得特定于上下文的列表的建议.

There are several built-in Markdown snippets included in VS Code - press Ctrl+Space (Trigger Suggest) and you get a context specific list of suggestions.

有什么办法,打字的时候自动触发snippet,因为比较麻烦,按Ctrl+Space

Does there any way, trigger snippet automatically when I type word, because it's troublesome, press Ctrl+Space

推荐答案

尝试 setting:

"[markdown]": {
  "editor.quickSuggestions": {
    "other": true,
    "comments": false,
    "strings": true
  },
},

这会在您开始输入时自动启用 IntelliSense.默认情况下,这将显示片段和基于单词的建议(基于当前文档中的单词的建议).要禁用基于单词的建议,请设置:

This enables IntelliSense automatically when you start typing. By default, this will show snippets and word based suggestions (suggestions based on words in the current document). To disable word based suggestions, set:

"[markdown]": {
    "editor.quickSuggestions": true,
    "editor.wordBasedSuggestions": false
}

您还可以设置:

"editor.snippetSuggestions": "top"

如果您总是希望在词库建议之前显示片段

If you always want snippets to show before word base suggestions

这篇关于如何自动设置 Markdown 片段触发器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆