VSCodepython片段在我的vscode中不起作用
我已经使用 VS Code 一个星期了,我想使用 VS Code 内置的 Python 片段,但它对我不起作用。我尝试过 JS 代码段,它在 VS Code 中运行良好,但 Python 代码段不起作用。
图片链接:
JS代码段:
PY 片段:
回答
找到答案:
似乎他们决定在上次更新中从 python 扩展中删除代码片段:
vscode 中的更改日志
它们可能会在未来添加回来,但现在我建议只使用 python 片段扩展:https ://marketplace.visualstudio.com/items ? itemName = frhtylcn.pythonsnippets
- If you want the exact old snippets because you're used to them (like I was) they can be found [here](https://github.com/microsoft/vscode-python/blob/2020.12.424452561/snippets/python.json) and added to your user snippets.