Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
cf5c0115
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
cf5c0115
编写于
11月 11, 2016
作者:
J
Johannes Rieken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix our snippets to be text mate compatible
上级
613dd2eb
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
193 addition
and
258 deletion
+193
-258
extensions/css/snippets/css.json
extensions/css/snippets/css.json
+9
-8
extensions/javascript/snippets/javascript.json
extensions/javascript/snippets/javascript.json
+19
-19
extensions/javascript/snippets/javascriptreact.json
extensions/javascript/snippets/javascriptreact.json
+19
-19
extensions/markdown/snippets/markdown.json
extensions/markdown/snippets/markdown.json
+16
-27
extensions/swift/snippets/swift.json
extensions/swift/snippets/swift.json
+15
-40
extensions/typescript/snippets/typescript.json
extensions/typescript/snippets/typescript.json
+38
-53
extensions/typescript/snippets/typescriptreact.json
extensions/typescript/snippets/typescriptreact.json
+39
-54
extensions/vb/snippets/vb.json
extensions/vb/snippets/vb.json
+38
-38
未找到文件。
extensions/css/snippets/css.json
浏览文件 @
cf5c0115
...
...
@@ -2,27 +2,28 @@
"transition property"
:
{
"prefix"
:
"transition"
,
"body"
:
[
"-webkit-transition: ${
property} ${duration} ${timing-function} ${
delay};"
,
"-moz-transition: ${
property} ${duration} ${timing-function} ${
delay};"
,
"transition: ${
property} ${duration} ${timing-function} ${
delay};"
"-webkit-transition: ${
1:property} ${2:duration} ${3:timing-function} ${4:
delay};"
,
"-moz-transition: ${
1:property} ${2:duration} ${3:timing-function} ${4:
delay};"
,
"transition: ${
1:property} ${2:duration} ${3:timing-function} ${4:
delay};"
],
"description"
:
"The transition property across browsers"
},
"border"
:
{
"prefix"
:
"border"
,
"body"
:
[
"border: ${
width} ${border-style} ${
color};$0"
"border: ${
1:width} ${2:border-style} ${3:
color};$0"
],
"description"
:
"[width] [border-style] [color]"
},
"gradient"
:
{
"prefix"
:
"gradient"
,
"body"
:
[
"background-image: -webkit-gradient(linear, left top, left bottom, from(${
start-color}), to(${
end-color}));"
,
"background-image: -webkit-linear-gradient(top, ${
start-color}, ${
end-color});"
,
"background-image: -moz-linear-gradient(top, ${
start-color}, ${
end-color});"
,
"background-image: linear-gradient(to bottom, ${
start-color}, ${
end-color});"
"background-image: -webkit-gradient(linear, left top, left bottom, from(${
1:start-color}), to(${2:
end-color}));"
,
"background-image: -webkit-linear-gradient(top, ${
1:start-color}, ${2:
end-color});"
,
"background-image: -moz-linear-gradient(top, ${
1:start-color}, ${2:
end-color});"
,
"background-image: linear-gradient(to bottom, ${
1:start-color}, ${2:
end-color});"
],
"description"
:
"Set the 'background-image' property to a linear gradient"
}
}
extensions/javascript/snippets/javascript.json
浏览文件 @
cf5c0115
...
...
@@ -4,8 +4,8 @@
"body"
:
[
"define(["
,
"
\t
'require',"
,
"
\t
'${dependency}'"
,
"], function(require, ${factory}) {"
,
"
\t
'${
1:
dependency}'"
,
"], function(require, ${
2:
factory}) {"
,
"
\t
'use strict';"
,
"
\t
$0"
,
"});"
...
...
@@ -15,8 +15,8 @@
"For Loop"
:
{
"prefix"
:
"for"
,
"body"
:
[
"for (var ${
index} = 0; ${index} < ${array}.length; ${
index}++) {"
,
"
\t
var ${
element} = ${array}[${
index}];"
,
"for (var ${
1:index} = 0; ${1:index} < ${2:array}.length; ${1:
index}++) {"
,
"
\t
var ${
3:element} = ${2:array}[${1:
index}];"
,
"
\t
$0"
,
"}"
],
...
...
@@ -25,7 +25,7 @@
"For-Each Loop"
:
{
"prefix"
:
"foreach"
,
"body"
:
[
"${
array}.forEach(function(${
element}) {"
,
"${
1:array}.forEach(function(${2:
element}) {"
,
"
\t
$0"
,
"}, this);"
],
...
...
@@ -34,9 +34,9 @@
"For-In Loop"
:
{
"prefix"
:
"forin"
,
"body"
:
[
"for (var ${
key} in ${
object}) {"
,
"
\t
if (${
object}.hasOwnProperty(${
key})) {"
,
"
\t\t
var ${
element} = ${object}[${
key}];"
,
"for (var ${
1:key} in ${2:
object}) {"
,
"
\t
if (${
2:object}.hasOwnProperty(${1:
key})) {"
,
"
\t\t
var ${
3:element} = ${2:object}[${1:
key}];"
,
"
\t\t
$0"
,
"
\t
}"
,
"}"
...
...
@@ -46,7 +46,7 @@
"Function Statement"
:
{
"prefix"
:
"function"
,
"body"
:
[
"function ${
name}(${
params}) {"
,
"function ${
1:name}(${2:
params}) {"
,
"
\t
$0"
,
"}"
],
...
...
@@ -55,7 +55,7 @@
"If Statement"
:
{
"prefix"
:
"if"
,
"body"
:
[
"if (${condition}) {"
,
"if (${
1:
condition}) {"
,
"
\t
$0"
,
"}"
],
...
...
@@ -64,7 +64,7 @@
"If-Else Statement"
:
{
"prefix"
:
"ifelse"
,
"body"
:
[
"if (${condition}) {"
,
"if (${
1:
condition}) {"
,
"
\t
$0"
,
"} else {"
,
"
\t
"
,
...
...
@@ -75,15 +75,15 @@
"New Statement"
:
{
"prefix"
:
"new"
,
"body"
:
[
"var ${
name} = new ${type}(${
arguments});$0"
"var ${
1:name} = new ${2:type}(${3:
arguments});$0"
],
"description"
:
"New Statement"
},
"Switch Statement"
:
{
"prefix"
:
"switch"
,
"body"
:
[
"switch (${key}) {"
,
"
\t
case ${value}:"
,
"switch (${
1:
key}) {"
,
"
\t
case ${
2:
value}:"
,
"
\t\t
$0"
,
"
\t\t
break;"
,
""
,
...
...
@@ -96,7 +96,7 @@
"While Statement"
:
{
"prefix"
:
"while"
,
"body"
:
[
"while (${condition}) {"
,
"while (${
1:
condition}) {"
,
"
\t
$0"
,
"}"
],
...
...
@@ -107,16 +107,16 @@
"body"
:
[
"do {"
,
"
\t
$0"
,
"} while (${condition});"
"} while (${
1:
condition});"
],
"description"
:
"Do-While Statement"
},
"Try-Catch Statement"
:{
"Try-Catch Statement"
:
{
"prefix"
:
"trycatch"
,
"body"
:
[
"try {"
,
"
\t
$0"
,
"} catch (${error}) {"
,
"} catch (${
1:
error}) {"
,
"
\t
"
,
"}"
],
...
...
@@ -127,7 +127,7 @@
"body"
:
[
"setTimeout(function() {"
,
"
\t
$0"
,
"}, ${timeout});"
"}, ${
1:
timeout});"
],
"description"
:
"Set Timeout Function"
},
...
...
extensions/javascript/snippets/javascriptreact.json
浏览文件 @
cf5c0115
...
...
@@ -4,8 +4,8 @@
"body"
:
[
"define(["
,
"
\t
'require',"
,
"
\t
'${dependency}'"
,
"], function(require, ${factory}) {"
,
"
\t
'${
1:
dependency}'"
,
"], function(require, ${
2:
factory}) {"
,
"
\t
'use strict';"
,
"
\t
$0"
,
"});"
...
...
@@ -15,8 +15,8 @@
"For Loop"
:
{
"prefix"
:
"for"
,
"body"
:
[
"for (var ${
index} = 0; ${index} < ${array}.length; ${
index}++) {"
,
"
\t
var ${
element} = ${array}[${
index}];"
,
"for (var ${
1:index} = 0; ${1:index} < ${2:array}.length; ${1:
index}++) {"
,
"
\t
var ${
3:element} = ${2:array}[${1:
index}];"
,
"
\t
$0"
,
"}"
],
...
...
@@ -25,7 +25,7 @@
"For-Each Loop"
:
{
"prefix"
:
"foreach"
,
"body"
:
[
"${
array}.forEach(function(${
element}) {"
,
"${
1:array}.forEach(function(${2:
element}) {"
,
"
\t
$0"
,
"}, this);"
],
...
...
@@ -34,9 +34,9 @@
"For-In Loop"
:
{
"prefix"
:
"forin"
,
"body"
:
[
"for (var ${
key} in ${
object}) {"
,
"
\t
if (${
object}.hasOwnProperty(${
key})) {"
,
"
\t\t
var ${
element} = ${object}[${
key}];"
,
"for (var ${
1:key} in ${2:
object}) {"
,
"
\t
if (${
2:object}.hasOwnProperty(${1:
key})) {"
,
"
\t\t
var ${
3:element} = ${2:object}[${1:
key}];"
,
"
\t\t
$0"
,
"
\t
}"
,
"}"
...
...
@@ -46,7 +46,7 @@
"Function Statement"
:
{
"prefix"
:
"function"
,
"body"
:
[
"function ${
name}(${
params}) {"
,
"function ${
1:name}(${2:
params}) {"
,
"
\t
$0"
,
"}"
],
...
...
@@ -55,7 +55,7 @@
"If Statement"
:
{
"prefix"
:
"if"
,
"body"
:
[
"if (${condition}) {"
,
"if (${
1:
condition}) {"
,
"
\t
$0"
,
"}"
],
...
...
@@ -64,7 +64,7 @@
"If-Else Statement"
:
{
"prefix"
:
"ifelse"
,
"body"
:
[
"if (${condition}) {"
,
"if (${
1:
condition}) {"
,
"
\t
$0"
,
"} else {"
,
"
\t
"
,
...
...
@@ -75,15 +75,15 @@
"New Statement"
:
{
"prefix"
:
"new"
,
"body"
:
[
"var ${
name} = new ${type}(${
arguments});$0"
"var ${
1:name} = new ${2:type}(${3:
arguments});$0"
],
"description"
:
"New Statement"
},
"Switch Statement"
:
{
"prefix"
:
"switch"
,
"body"
:
[
"switch (${key}) {"
,
"
\t
case ${value}:"
,
"switch (${
1:
key}) {"
,
"
\t
case ${
2:
value}:"
,
"
\t\t
$0"
,
"
\t\t
break;"
,
""
,
...
...
@@ -96,7 +96,7 @@
"While Statement"
:
{
"prefix"
:
"while"
,
"body"
:
[
"while (${condition}) {"
,
"while (${
1:
condition}) {"
,
"
\t
$0"
,
"}"
],
...
...
@@ -107,16 +107,16 @@
"body"
:
[
"do {"
,
"
\t
$0"
,
"} while (${condition});"
"} while (${
1:
condition});"
],
"description"
:
"Do-While Statement"
},
"Try-Catch Statement"
:{
"Try-Catch Statement"
:
{
"prefix"
:
"trycatch"
,
"body"
:
[
"try {"
,
"
\t
$0"
,
"} catch (${error}) {"
,
"} catch (${
2:
error}) {"
,
"
\t
"
,
"}"
],
...
...
@@ -127,7 +127,7 @@
"body"
:
[
"setTimeout(function() {"
,
"
\t
$0"
,
"}, ${timeout});"
"}, ${
1:
timeout});"
],
"description"
:
"Set Timeout Function"
},
...
...
extensions/markdown/snippets/markdown.json
浏览文件 @
cf5c0115
{
"Insert bold text"
:
{
"prefix"
:
"bold"
,
"body"
:
"**${text}**${}"
,
"body"
:
"**${
1:
text}**${}"
,
"description"
:
"Insert bold text"
},
"Insert italic text"
:
{
"prefix"
:
"italic"
,
"body"
:
"*${text}*${}"
,
"body"
:
"*${
1:
text}*${}"
,
"description"
:
"Insert italic text"
},
"Insert quoted text"
:
{
"prefix"
:
"quote"
,
"body"
:
"> ${text}"
,
"body"
:
"> ${
1:
text}"
,
"description"
:
"Insert quoted text"
},
"Insert code"
:
{
"prefix"
:
"code"
,
"body"
:
"`${text}`${}"
,
"body"
:
"`${
1:
text}`${}"
,
"description"
:
"Insert code"
},
"Insert fenced code block"
:
{
"prefix"
:
"fenced codeblock"
,
"body"
:
[
"```${language}"
,
"```${
1:
language}"
,
"$0"
,
"```"
],
"description"
:
"Insert fenced code block"
},
"Insert heading"
:
{
"prefix"
:
"heading"
,
"body"
:
"# ${text}"
,
"body"
:
"# ${
1:
text}"
,
"description"
:
"Insert heading"
},
"Insert unordered list"
:
{
"prefix"
:
"unordered list"
,
"body"
:
[
"- ${first}"
,
"- ${second}"
,
"- ${third}"
,
"- ${
1:
first}"
,
"- ${
2:
second}"
,
"- ${
3:
third}"
,
"$0"
],
"description"
:
"Insert unordered list"
},
"Insert ordered list"
:
{
"prefix"
:
"ordered list"
,
"body"
:
[
"1. ${first}"
,
"2. ${second}"
,
"3. ${third}"
,
"1. ${
1:
first}"
,
"2. ${
2:
second}"
,
"3. ${
3:
third}"
,
"$0"
],
"description"
:
"Insert ordered list"
},
"Insert horizontal rule"
:
{
"prefix"
:
"horizontal rule"
,
"body"
:
"----------
\n
"
,
"description"
:
"Insert horizontal rule"
},
"Insert link"
:
{
"prefix"
:
"link"
,
"body"
:
"[${
text}](http://${
link})$0"
,
"body"
:
"[${
1:text}](http://${2:
link})$0"
,
"description"
:
"Insert link"
},
"Insert image"
:
{
"Insert image"
:
{
"prefix"
:
"image"
,
"body"
:
"![${
alt}](http://${
link})$0"
,
"body"
:
"![${
1:alt}](http://${2:
link})$0"
,
"description"
:
"Insert image"
}
}
\ No newline at end of file
}
extensions/swift/snippets/swift.json
浏览文件 @
cf5c0115
...
...
@@ -7,86 +7,70 @@
"prefix"
:
"po"
,
"body"
:
"print(
\"\\
($1)
\"
)$0"
},
"repeat...while loop"
:
{
"prefix"
:
"repeat"
,
"body"
:
[
"repeat {"
,
" $0"
,
"} while ${true}"
"} while ${
1:
true}"
],
"description"
:
"repeat...while loop"
},
"While loop"
:
{
"prefix"
:
"while"
,
"body"
:
[
"while ${true} {"
,
"while ${
1:
true} {"
,
" $0"
,
"}"
],
"description"
:
"While loop"
},
"For-In statement"
:
{
"prefix"
:
"forin"
,
"body"
:
[
"for ${
item} in ${
collection} {"
,
"for ${
1:item} in ${2:
collection} {"
,
" $0"
,
"}"
],
"description"
:
"For-In statement"
},
"Reverse for loop"
:
{
"prefix"
:
"forr"
,
"body"
:
[
"for var ${
i} = ${length} - 1; ${i} >= 0; ${
i}-- {"
,
"for var ${
1:i} = ${2:length} - 1; ${1:i} >= 0; ${1:
i}-- {"
,
" $0"
,
"}"
],
"description"
:
"Reverse for loop"
},
"for loop"
:
{
"prefix"
:
"for"
,
"body"
:
[
"for var ${
i} = 0; ${i} < ${length}; ${
i}++ {"
,
"for var ${
1:i} = 0; ${1:i} < ${2:length}; ${1:
i}++ {"
,
" $0"
,
"}"
],
"description"
:
"for loop"
},
"if statement"
:
{
"prefix"
:
"if"
,
"body"
:
[
"if ${true} {"
,
"if ${
1:
true} {"
,
" $0"
,
"}"
],
"description"
:
"if statement"
},
"else-if statement"
:
{
"prefix"
:
"elif"
,
"body"
:
[
"else if ${true} {"
,
"else if ${
1:
true} {"
,
" $0"
,
"}"
],
"description"
:
"if statement"
},
"Else statement"
:
{
"prefix"
:
"else"
,
"body"
:
[
"else {"
,
...
...
@@ -95,35 +79,29 @@
],
"description"
:
"Else statement"
},
"Guard statement"
:
{
"prefix"
:
"guard"
,
"body"
:
[
"guard let ${
a} = ${
optional} else {"
,
"guard let ${
1:a} = ${2:
optional} else {"
,
" $0"
,
"}"
],
"description"
:
"Guard statement"
},
"Optional Binding statement"
:
{
"prefix"
:
"ifnil"
,
"body"
:
[
"if let ${
a} = ${
optional} {"
,
"if let ${
1:a} = ${2:
optional} {"
,
" $0"
,
"}"
],
"description"
:
"Optional Binding statement"
},
"Switch statement"
:
{
"prefix"
:
"switch"
,
"body"
:
[
"switch ${switch_on} {"
,
"case ${a}:"
,
"switch ${
1:
switch_on} {"
,
"case ${
2:
a}:"
,
" $0"
,
"default:"
,
" $1"
,
...
...
@@ -131,28 +109,25 @@
],
"description"
:
"Switch statement"
},
"Do catch"
:
{
"prefix"
:
"docatch"
,
"body"
:
[
"do {"
,
" try ${function that throws}"
,
"} catch ${pattern} {"
,
" try ${
1:
function that throws}"
,
"} catch ${
2:
pattern} {"
,
" $0"
,
"}"
],
"description"
:
"Try catch"
},
"Enum"
:
{
"prefix"
:
"enum"
,
"body"
:
[
"enum ${Name} {"
,
"enum ${
1:
Name} {"
,
" case $0"
,
"}"
],
"description"
:
"Enum"
}
}
extensions/typescript/snippets/typescript.json
浏览文件 @
cf5c0115
...
...
@@ -8,7 +8,6 @@
],
"description"
:
"jsdoc snippet"
},
"Constructor"
:
{
"prefix"
:
"ctor"
,
"body"
:
[
...
...
@@ -22,99 +21,90 @@
],
"description"
:
"Constructor"
},
"Class Definition"
:
{
"prefix"
:
"class"
,
"body"
:
[
"/**"
,
" * ${name}"
,
" * ${
1:
name}"
,
" */"
,
"class ${name} {"
,
"
\t
constructor(${parameters}) {"
,
"class ${
1:
name} {"
,
"
\t
constructor(${
2:
parameters}) {"
,
"
\t\t
$0"
,
"
\t
}"
,
"}"
],
"description"
:
"Class Definition"
},
"Public Method Definition"
:
{
"prefix"
:
"public method"
,
"body"
:
[
"/**"
,
" * ${name}"
,
" * ${
1:
name}"
,
" */"
,
"public ${name}() {"
,
"public ${
1:
name}() {"
,
"
\t
$0"
,
"}"
],
"description"
:
"Public Method Definition"
},
"Private Method Definition"
:
{
"prefix"
:
"private method"
,
"body"
:
[
"private ${name}() {"
,
"private ${
1:
name}() {"
,
"
\t
$0"
,
"}"
],
"description"
:
"Private Method Definition"
},
"Import external module."
:
{
"prefix"
:
"import statement"
,
"body"
:
[
"import { $0 } from '${module}';"
"import { $0 } from '${
1:
module}';"
],
"description"
:
"Import external module."
},
"Property getter"
:
{
"prefix"
:
"get"
,
"body"
:
[
""
,
"public get ${
value}() : ${
string} {"
,
" ${return $0}"
,
"public get ${
1:value}() : ${2:
string} {"
,
" ${
3:
return $0}"
,
"}"
,
""
],
"description"
:
"Property getter"
},
"Log to the console"
:
{
"prefix"
:
"log"
,
"body"
:
[
"console.log($
{_}
);"
,
"console.log($
1
);"
,
"$0"
],
"description"
:
"Log to the console"
},
"Define a full property"
:
{
"prefix"
:
"prop"
,
"body"
:
[
""
,
"private _${
value} : ${
string};"
,
"public get ${
value}() : ${
string} {"
,
" return this._${value};"
,
"private _${
1:value} : ${2:
string};"
,
"public get ${
1:value}() : ${2:
string} {"
,
" return this._${
1:
value};"
,
"}"
,
"public set ${
value}(v : ${
string}) {"
,
" this._${value} = v;"
,
"public set ${
1:value}(v : ${2:
string}) {"
,
" this._${
1:
value} = v;"
,
"}"
,
""
],
"description"
:
"Define a full property"
},
"Triple-slash reference"
:
{
"prefix"
:
"ref"
,
"body"
:
[
"/// <reference path=
\"
$
{_}
\"
/>"
,
"/// <reference path=
\"
$
1
\"
/>"
,
"$0"
],
"description"
:
"Triple-slash reference"
},
"Return false"
:
{
"prefix"
:
"ret0"
,
"body"
:
[
...
...
@@ -122,7 +112,6 @@
],
"description"
:
"Return false"
},
"Return true"
:
{
"prefix"
:
"ret1"
,
"body"
:
[
...
...
@@ -130,41 +119,37 @@
],
"description"
:
"Return true"
},
"Return statement"
:
{
"prefix"
:
"ret"
,
"body"
:
[
"return $
{_}
;$0"
"return $
1
;$0"
],
"description"
:
"Return statement"
},
"Property setter"
:
{
"prefix"
:
"set"
,
"body"
:
[
""
,
"public set ${
value}(v : ${
string}) {"
,
" this.$
{_}
= v;"
,
"public set ${
1:value}(v : ${2:
string}) {"
,
" this.$
3
= v;"
,
"}"
,
""
],
"description"
:
"Property setter"
},
"Throw Exception"
:
{
"prefix"
:
"throw"
,
"body"
:
[
"throw
\"
$
{_}
\"
;"
,
"throw
\"
$
1
\"
;"
,
"$0"
],
"description"
:
"Throw Exception"
},
"For Loop"
:
{
"prefix"
:
"for"
,
"body"
:
[
"for (var ${
index} = 0; ${index} < ${array}.length; ${
index}++) {"
,
"
\t
var ${
element} = ${array}[${
index}];"
,
"for (var ${
1:index} = 0; ${1:index} < ${2:array}.length; ${1:
index}++) {"
,
"
\t
var ${
3:element} = ${2:array}[${1:
index}];"
,
"
\t
$0"
,
"}"
],
...
...
@@ -173,7 +158,7 @@
"For-Each Loop using =>"
:
{
"prefix"
:
"foreach =>"
,
"body"
:
[
"${
array}.forEach(${
element} => {"
,
"${
1:array}.forEach(${2:
element} => {"
,
"
\t
$0"
,
"});"
],
...
...
@@ -182,9 +167,9 @@
"For-In Loop"
:
{
"prefix"
:
"forin"
,
"body"
:
[
"for (var ${
key} in ${
object}) {"
,
"
\t
if (${
object}.hasOwnProperty(${
key})) {"
,
"
\t\t
var ${
element} = ${object}[${
key}];"
,
"for (var ${
1:key} in ${2:
object}) {"
,
"
\t
if (${
2:object}.hasOwnProperty(${1:
key})) {"
,
"
\t\t
var ${
3:element} = ${2:object}[${1:
key}];"
,
"
\t\t
$0"
,
"
\t
}"
,
"}"
...
...
@@ -194,7 +179,7 @@
"Function Statement"
:
{
"prefix"
:
"function"
,
"body"
:
[
"function ${
name}(${params}:${
type}) {"
,
"function ${
1:name}(${2:params}:${3:
type}) {"
,
"
\t
$0"
,
"}"
],
...
...
@@ -203,7 +188,7 @@
"If Statement"
:
{
"prefix"
:
"if"
,
"body"
:
[
"if (${condition}) {"
,
"if (${
1:
condition}) {"
,
"
\t
$0"
,
"}"
],
...
...
@@ -212,7 +197,7 @@
"If-Else Statement"
:
{
"prefix"
:
"ifelse"
,
"body"
:
[
"if (${condition}) {"
,
"if (${
1:
condition}) {"
,
"
\t
$0"
,
"} else {"
,
"
\t
"
,
...
...
@@ -223,15 +208,15 @@
"New Statement"
:
{
"prefix"
:
"new"
,
"body"
:
[
"var ${
name} = new ${type}(${
arguments});$0"
"var ${
1:name} = new ${2:type}(${3:
arguments});$0"
],
"description"
:
"New Statement"
},
"Switch Statement"
:
{
"prefix"
:
"switch"
,
"body"
:
[
"switch (${key}) {"
,
"
\t
case ${value}:"
,
"switch (${
1:
key}) {"
,
"
\t
case ${
2:
value}:"
,
"
\t\t
$0"
,
"
\t\t
break;"
,
""
,
...
...
@@ -244,7 +229,7 @@
"While Statement"
:
{
"prefix"
:
"while"
,
"body"
:
[
"while (${condition}) {"
,
"while (${
1:
condition}) {"
,
"
\t
$0"
,
"}"
],
...
...
@@ -255,16 +240,16 @@
"body"
:
[
"do {"
,
"
\t
$0"
,
"} while (${condition});"
"} while (${
1:
condition});"
],
"description"
:
"Do-While Statement"
},
"Try-Catch Statement"
:{
"Try-Catch Statement"
:
{
"prefix"
:
"trycatch"
,
"body"
:
[
"try {"
,
"
\t
$0"
,
"} catch (${error}) {"
,
"} catch (${
1:
error}) {"
,
"
\t
"
,
"}"
],
...
...
@@ -275,8 +260,8 @@
"body"
:
[
"setTimeout(function() {"
,
"
\t
$0"
,
"}, ${timeout});"
"}, ${
1:
timeout});"
],
"description"
:
"Set Timeout Function"
}
}
\ No newline at end of file
}
extensions/typescript/snippets/typescriptreact.json
浏览文件 @
cf5c0115
...
...
@@ -8,7 +8,6 @@
],
"description"
:
"jsdoc snippet"
},
"Constructor"
:
{
"prefix"
:
"ctor"
,
"body"
:
[
...
...
@@ -22,99 +21,90 @@
],
"description"
:
"Constructor"
},
"Class Definition"
:
{
"prefix"
:
"class"
,
"body"
:
[
"/**"
,
" * ${name}"
,
" * ${
1:
name}"
,
" */"
,
"class ${name} {"
,
"
\t
constructor(${parameters}) {"
,
"class ${
1:
name} {"
,
"
\t
constructor(${
2:
parameters}) {"
,
"
\t\t
$0"
,
"
\t
}"
,
"}"
],
"description"
:
"Class Definition"
},
"Public Method Definition"
:
{
"prefix"
:
"public method"
,
"body"
:
[
"/**"
,
" * ${name}"
,
" * ${
1:
name}"
,
" */"
,
"public ${name}() {"
,
"public ${
1:
name}() {"
,
"
\t
$0"
,
"}"
],
"description"
:
"Public Method Definition"
},
"Private Method Definition"
:
{
"prefix"
:
"private method"
,
"body"
:
[
"private ${name}() {"
,
"private ${
1:
name}() {"
,
"
\t
$0"
,
"}"
],
"description"
:
"Private Method Definition"
},
"Import external module."
:
{
"prefix"
:
"import statement"
,
"body"
:
[
"import ${name} = require('$0');"
"import ${
1:
name} = require('$0');"
],
"description"
:
"Import external module."
},
"Property getter"
:
{
"prefix"
:
"get"
,
"body"
:
[
""
,
"public get ${
value}() : ${
string} {"
,
" ${return $0}"
,
"public get ${
1:value}() : ${2:
string} {"
,
" ${
3:
return $0}"
,
"}"
,
""
],
"description"
:
"Property getter"
},
"Log to the console"
:
{
"prefix"
:
"log"
,
"body"
:
[
"console.log($
{_}
);"
,
"console.log($
1
);"
,
"$0"
],
"description"
:
"Log to the console"
},
"Define a full property"
:
{
"prefix"
:
"prop"
,
"body"
:
[
""
,
"private _${
value} : ${
string};"
,
"public get ${
value}() : ${
string} {"
,
" return this._${value};"
,
"private _${
1:value} : ${2:
string};"
,
"public get ${
1:value}() : ${2:
string} {"
,
" return this._${
1:
value};"
,
"}"
,
"public set ${
value}(v : ${
string}) {"
,
" this._${value} = v;"
,
"public set ${
1:value}(v : ${2:
string}) {"
,
" this._${
1:
value} = v;"
,
"}"
,
""
],
"description"
:
"Define a full property"
},
"Triple-slash reference"
:
{
"prefix"
:
"ref"
,
"body"
:
[
"/// <reference path=
\"
$
{_}
\"
/>"
,
"/// <reference path=
\"
$
1
\"
/>"
,
"$0"
],
"description"
:
"Triple-slash reference"
},
"Return false"
:
{
"prefix"
:
"ret0"
,
"body"
:
[
...
...
@@ -122,7 +112,6 @@
],
"description"
:
"Return false"
},
"Return true"
:
{
"prefix"
:
"ret1"
,
"body"
:
[
...
...
@@ -130,41 +119,37 @@
],
"description"
:
"Return true"
},
"Return statement"
:
{
"prefix"
:
"ret"
,
"body"
:
[
"return $
{_}
;$0"
"return $
1
;$0"
],
"description"
:
"Return statement"
},
"Property setter"
:
{
"prefix"
:
"set"
,
"body"
:
[
""
,
"public set ${
value}(v : ${
string}) {"
,
" this.$
{_}
= v;"
,
"public set ${
1:value}(v : ${2:
string}) {"
,
" this.$
3
= v;"
,
"}"
,
""
],
"description"
:
"Property setter"
},
"Throw Exception"
:
{
"prefix"
:
"throw"
,
"body"
:
[
"throw
\"
$
{_}
\"
;"
,
"throw
\"
$
1
\"
;"
,
"$0"
],
"description"
:
"Throw Exception"
},
"For Loop"
:
{
"prefix"
:
"for"
,
"body"
:
[
"for (var ${
index} = 0; ${index} < ${array}.length; ${
index}++) {"
,
"
\t
var ${
element} = ${array}[${
index}];"
,
"for (var ${
1:index} = 0; ${1:index} < ${2:array}.length; ${1:
index}++) {"
,
"
\t
var ${
3:element} = ${2:array}[${1:
index}];"
,
"
\t
$0"
,
"}"
],
...
...
@@ -173,18 +158,18 @@
"For-Each Loop using =>"
:
{
"prefix"
:
"foreach =>"
,
"body"
:
[
"${
array}.forEach(${
element} => {"
,
"${
1:array}.forEach(${2:
element} => {"
,
"
\t
$0"
,
"});"
],
"description"
:
"For-Each Loop using =>"
},
},
"For-In Loop"
:
{
"prefix"
:
"forin"
,
"body"
:
[
"for (var ${
key} in ${
object}) {"
,
"
\t
if (${
object}.hasOwnProperty(${
key})) {"
,
"
\t\t
var ${
element} = ${object}[${
key}];"
,
"for (var ${
1:key} in ${2:
object}) {"
,
"
\t
if (${
2:object}.hasOwnProperty(${1:
key})) {"
,
"
\t\t
var ${
3:element} = ${2:object}[${1:
key}];"
,
"
\t\t
$0"
,
"
\t
}"
,
"}"
...
...
@@ -194,7 +179,7 @@
"Function Statement"
:
{
"prefix"
:
"function"
,
"body"
:
[
"function ${
name}(${params}:${
type}) {"
,
"function ${
1:name}(${2:params}:${3:
type}) {"
,
"
\t
$0"
,
"}"
],
...
...
@@ -203,7 +188,7 @@
"If Statement"
:
{
"prefix"
:
"if"
,
"body"
:
[
"if (${condition}) {"
,
"if (${
1:
condition}) {"
,
"
\t
$0"
,
"}"
],
...
...
@@ -212,7 +197,7 @@
"If-Else Statement"
:
{
"prefix"
:
"ifelse"
,
"body"
:
[
"if (${condition}) {"
,
"if (${
1:
condition}) {"
,
"
\t
$0"
,
"} else {"
,
"
\t
"
,
...
...
@@ -223,15 +208,15 @@
"New Statement"
:
{
"prefix"
:
"new"
,
"body"
:
[
"var ${
name} = new ${type}(${
arguments});$0"
"var ${
1:name} = new ${2:type}(${2:
arguments});$0"
],
"description"
:
"New Statement"
},
"Switch Statement"
:
{
"prefix"
:
"switch"
,
"body"
:
[
"switch (${key}) {"
,
"
\t
case ${value}:"
,
"switch (${
1:
key}) {"
,
"
\t
case ${
2:
value}:"
,
"
\t\t
$0"
,
"
\t\t
break;"
,
""
,
...
...
@@ -244,7 +229,7 @@
"While Statement"
:
{
"prefix"
:
"while"
,
"body"
:
[
"while (${condition}) {"
,
"while (${
1:
condition}) {"
,
"
\t
$0"
,
"}"
],
...
...
@@ -255,16 +240,16 @@
"body"
:
[
"do {"
,
"
\t
$0"
,
"} while (${condition});"
"} while (${
1:
condition});"
],
"description"
:
"Do-While Statement"
},
"Try-Catch Statement"
:{
"Try-Catch Statement"
:
{
"prefix"
:
"trycatch"
,
"body"
:
[
"try {"
,
"
\t
$0"
,
"} catch (${error}) {"
,
"} catch (${
1:
error}) {"
,
"
\t
"
,
"}"
],
...
...
@@ -275,8 +260,8 @@
"body"
:
[
"setTimeout(function() {"
,
"
\t
$0"
,
"}, ${timeout});"
"}, ${
1:
timeout});"
],
"description"
:
"Set Timeout Function"
}
}
\ No newline at end of file
}
extensions/vb/snippets/vb.json
浏览文件 @
cf5c0115
{
"For Next Loop"
:
{
"prefix"
:
"for"
,
"body"
:
[
"For ${
index} As ${ObjectType} = ${lower} To ${
Upper}"
,
"For Next Loop"
:
{
"prefix"
:
"for"
,
"body"
:
[
"For ${
1:index} As ${2:ObjectType} = ${3:lower} To ${4:
Upper}"
,
"
\t
$0"
,
"Next ${index}"
"Next ${
1:
index}"
],
"description"
:
"For Next Loop"
},
"For Each...Next"
:
{
"prefix"
:
"fore"
,
"body"
:
[
"For Each ${
Variable} As ${ObjectType} In ${
Collection}"
,
},
"For Each...Next"
:
{
"prefix"
:
"fore"
,
"body"
:
[
"For Each ${
1:Variable} As ${2:ObjectType} In ${3:
Collection}"
,
"
\t
$0"
,
"Next"
],
"description"
:
"For Each...Next"
},
"For i...Next i"
:
{
"prefix"
:
"fori"
,
"body"
:
[
"For i As ${
Integer} = ${Lower} To ${
Upper}"
,
},
"For i...Next i"
:
{
"prefix"
:
"fori"
,
"body"
:
[
"For i As ${
1:Integer} = ${2:Lower} To ${3:
Upper}"
,
"
\t
$0"
,
"Next i"
],
"description"
:
"For i...Next i"
},
"For j...Next j"
:
{
"prefix"
:
"forj"
,
"body"
:
[
"For j As ${
Integer} = ${Lower} To ${
Upper}"
,
},
"For j...Next j"
:
{
"prefix"
:
"forj"
,
"body"
:
[
"For j As ${
1:Integer} = ${2:Lower} To ${3:
Upper}"
,
"
\t
$0"
,
"Next j"
],
"description"
:
"For j...Next j"
},
"Public Function..."
:
{
"prefix"
:
"pf"
,
"body"
:
[
"Public Function ${
FunctionName}(${ParameterList}) As ${
ReturnType}"
,
},
"Public Function..."
:
{
"prefix"
:
"pf"
,
"body"
:
[
"Public Function ${
1:FunctionName}(${2:ParameterList}) As ${3:
ReturnType}"
,
"
\t
Try"
,
"
\t\t
$0"
,
"
\t
Catch ex As Exception"
,
"
\t
End Try"
,
"
\t
Return ${ReturnValue}"
,
"
\t
Return ${
3:
ReturnValue}"
,
"End Function"
],
"description"
:
"Public Function..."
},
"Public Sub ..."
:
{
"prefix"
:
"ps"
,
"body"
:
[
"Public Sub ${
ProcedureName}(${
ParameterList})"
,
},
"Public Sub ..."
:
{
"prefix"
:
"ps"
,
"body"
:
[
"Public Sub ${
1:ProcedureName}(${2:
ParameterList})"
,
"
\t
Try"
,
"
\t\t
$0"
,
"
\t
Catch ex As Exception"
,
...
...
@@ -59,14 +59,14 @@
"End Sub"
],
"description"
:
"Public Sub ..."
},
"While ... End While"
:
{
"prefix"
:
"while"
,
"body"
:
[
"While ${Boolean}"
,
},
"While ... End While"
:
{
"prefix"
:
"while"
,
"body"
:
[
"While ${
1:
Boolean}"
,
"
\t
$0"
,
"End While"
],
"description"
:
"While ... End While"
}
}
\ No newline at end of file
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录