1 Star 0 Fork 0

jianshanbushishan/friendly-snippets

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
dart.json 2.30 KB
一键复制 编辑 原始数据 按行查看 历史
kedap 提交于 2022-03-24 14:45 +08:00 . add enum to snippets
{
"main": {
"prefix": "main",
"description": "Insert a main function, used as an entry point.",
"body": ["void main(List<String> args) {", " $0", "}"]
},
"try": {
"prefix": "try",
"description": "Insert a try/catch block.",
"body": ["try {", " $0", "} catch (${1:e}) {", "}"]
},
"if": {
"prefix": "if",
"description": "Insert an if statement.",
"body": ["if ($1) {", " $0", "}"]
},
"if else": {
"prefix": "ife",
"description": "Insert an if statement with an else block.",
"body": ["if ($1) {", " $0", "} else {", "}"]
},
"switch case": {
"prefix": "switch",
"description": "Insert a switch statement.",
"body": [
"switch ($1) {",
" case $2:",
" $0",
" break;",
" default:",
"}"
]
},
"for": {
"prefix": "for",
"description": "Insert a for loop.",
"body": ["for (var i = 0; i < ${1:count}; i++) {", " $0", "}"]
},
"for in": {
"prefix": "fori",
"description": "Insert a for-in loop.",
"body": ["for (var ${1:item} in ${2:items}) {", " $0", "}"]
},
"while": {
"prefix": "while",
"description": "Insert a while loop.",
"body": ["while ($1) {", " $0", "}"]
},
"do while": {
"prefix": "do",
"description": "Insert a do-while loop.",
"body": ["do {", " $0", "} while ($1);"]
},
"fun": {
"prefix": "fun",
"description": "Insert a function definition.",
"body": ["${3:void} ${1:name}(${2:args}) {", " $0", "}"]
},
"class": {
"prefix": "class",
"description": "Insert a class definition.",
"body": ["class ${1:Name} {", " $0", "}"]
},
"typedef": {
"prefix": "typedef",
"description": "Insert a typedef.",
"body": "typedef ${1:Type} ${2:Name}(${3:params});"
},
"test": {
"prefix": "test",
"description": "Insert a test block.",
"body": ["test('$1', () {", " $0", "});"]
},
"group": {
"prefix": "group",
"description": "Insert a test group block.",
"body": ["group('$1', () {", " $0", "});"]
},
"enum": {
"prefix": "enum",
"description": "Insert a enum.",
"body": ["enum ${1:Name} {", " $0", "}"]
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/jianshanbushishan/friendly-snippets.git
git@gitee.com:jianshanbushishan/friendly-snippets.git
jianshanbushishan
friendly-snippets
friendly-snippets
main

搜索帮助