zjffun / vscode-snippets-manager

Create and edit snippets easily.
https://marketplace.visualstudio.com/items?itemName=zjffun.snippetsmanager
MIT License
38 stars 7 forks source link

请问如何设定:让创建的代码默认到一个全局模板中,而不是在项目文件夹下面呢? #15

Closed zhangsanfu closed 6 months ago

zhangsanfu commented 1 year ago

请问如何设定:让创建的代码默认到一个全局模板中,而不是在项目文件夹下面呢? 每一次都选择创建代码到某个模板,还是有点不太方便。 现在默认的是创建代码模板到本项目下面的.vscode中,换了其他项目之后,模板都丢失了

zjffun commented 1 year ago

这种情况可以使用全局的代码片段。

首先,创建全局的代码片段文件:

Screen Shot 2023-04-29 at 17 12 40

然后,使用选中代码使用右键菜单的 创建代码片段到... 功能:

Screen Shot 2023-04-29 at 17 12 57

最后,选择全局的代码片段文件,就能将选中代码创建到全局的代码片段文件了:

Screen Shot 2023-04-29 at 17 13 17
zjffun commented 6 months ago

Closing this issue due to inactivity. Please feel free to reopen this issue if you are still running into issues and we would be happy to help troubleshoot further.