问题描述
在正式的vscode文档中,我已经看到可以为每种语言创建自定义代码段。
In official vscode documentation i have seen that is possible to create custom snippets for each language.https://code.visualstudio.com/Docs/customization/userdefinedsnippets
例如。 (languageId).json
但是如果我想定义所有语言通用的代码段?
But if i want to define snippets common for all languages? It is possible?
推荐答案
当前不支持普通用户代码段,但。请让我们知道这是否对您有用。
Common users snippets are currently not supported, but there is a VSCode issue tracking this feature request. Please let us know if this is something you would find useful.
出于完整性考虑,,但它们必须明确指定为其提供代码段的所有语言(是没有 language: *
选项)。
For completeness, VSCode extensions can register the same snippets for multiple languages but they must explicitly specify all languages they provide snippets for (there is no "language": "*"
option).
这篇关于如何在Visual Studio Code中添加通用语言片段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!