如何在 vs 代码中优先选择用户代码片段而不是扩展代码片段?

How to give preference to the user snippet over snippet of extension in vs code?

大家好,我在 c.json 文件

中创建了自己的 printf 代码片段
"printf": {
    "prefix": "printf",
    "body": [
      "printf(\"\");",
      ""
    ],
    "description": "Printf statement"
  }

但在主要 window 中,当我键入 printf 时,c/c++ 扩展的 printf 代码片段首先出现在建议中,然后才是我的。 有什么方法可以让我的用户代码片段比扩展的代码片段更受青睐?

在“设置”中,您可以使用

Editor: Snippet Suggestions
Controls whether snippets are shown with other suggestions and how they are sorted.

或者您可以将前缀设置为 'aprintf' 或 'myprintf'。