一个根据gist 快速生成vscode 代码模板的工具
Explore the docs »
npm install -g gisnippet
$ gisnippet -h
# output
Usage: index [options] [command]
Options:
-v output the version number
-g, --global localed your snippets (default: false)
-h, --help display help for command
Commands:
login <token> login with github token
globalfolder <folder> set your vscode snippets folder
sync <id> sync your gists to vscode snippets,if id is empty,mg will sync all your gists
show show your gists
help [command] display help for command
首先需要登录你的github,获取一个可以访问gist的token,并登录
gisnippet login <yourtoken>
然后需要配置你的vscode 代码段路径 一般在这个目录下 C:\Users\yourname\AppData\Roaming\Code\User\snippets
gisnippet globalfolder <folder>
使用show命令查看你当前的代码段
gisnippet show
使用sync id 来同步某个代码段
gisnippet sync id [-g]
加上-g 将安装到vscode全局目录,否则将装在当前文件夹