经常用到的片段保存至 Snippets 文件夹(或子文件夹)下,然后采用 snipster publish 命令生成对应编辑器的 snippet.
Snippet 的格式:
- the file name is the prefix for the snippet.
- the file extension is the language scope for the snippet. 适用于多种语言在这些语言之间添加+号。
- the file content is the body of the snippet, exactly the content that appears after you type the prefix and hit ‘tab’ (minus the tab stops and placeholders).
本文档为 Snippets 的简明列表。
遗憾的是缺少 file description 功能,后续自己修改这部分功能,将 snippet 的第一条注释作为 description.