Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
013fff3f
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,发现更多精彩内容 >>
提交
013fff3f
编写于
1月 23, 2018
作者:
S
Steven Van Impe
提交者:
Matt Bierner
1月 23, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update Swift snippets (#42048)
上级
d260ccff
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
103 addition
and
61 deletion
+103
-61
extensions/swift/snippets/swift.json
extensions/swift/snippets/swift.json
+103
-61
未找到文件。
extensions/swift/snippets/swift.json
浏览文件 @
013fff3f
{
"print(\"...\")"
:
{
"prefix"
:
"pr"
,
"body"
:
"print(
\"
$1
\"
)$0"
"print"
:
{
"prefix"
:
"print"
,
"body"
:
"print(
\"
$1
\"
)
\n
$0"
,
"description"
:
"print(
\"
...
\"
)"
},
"print(\"\\(...)\")"
:
{
"prefix"
:
"po"
,
"body"
:
"print(
\"\\
($1)
\"
)$0"
"print value"
:
{
"prefix"
:
"printv"
,
"body"
:
"print(
\"\\
($1)
\"
)
\n
$0"
,
"description"
:
"print(
\"\\
(...)
\"
)"
},
"repeat...while loop"
:
{
"while"
:
{
"prefix"
:
"while"
,
"body"
:
[
"while ${1:condition} {"
,
"
\t
$0"
,
"}"
],
"description"
:
"while statement"
},
"repeat-while"
:
{
"prefix"
:
"repeat"
,
"body"
:
[
"repeat {"
,
"
\t
$0"
,
"} while ${1:
true
}"
"} while ${1:
condition
}"
],
"description"
:
"repeat
...while loop
"
"description"
:
"repeat
-while statement
"
},
"
While loop
"
:
{
"prefix"
:
"
while
"
,
"
for
"
:
{
"prefix"
:
"
for
"
,
"body"
:
[
"
while ${1:true
} {"
,
"
for ${1:item} in ${2:collection
} {"
,
"
\t
$0"
,
"}"
],
"description"
:
"
While loop
"
"description"
:
"
for-in statement
"
},
"
For-In statement
"
:
{
"prefix"
:
"
forin
"
,
"
if
"
:
{
"prefix"
:
"
if
"
,
"body"
:
[
"
for ${1:item} in ${2:collec
tion} {"
,
"
if ${1:condi
tion} {"
,
"
\t
$0"
,
"}"
],
"description"
:
"
For-In
statement"
"description"
:
"
if
statement"
},
"
Reverse for loop
"
:
{
"prefix"
:
"
forr
"
,
"
else if
"
:
{
"prefix"
:
"
elif
"
,
"body"
:
[
"
for var ${1:i} = ${2:length} - 1; ${1:i} >= 0; ${1:i}--
{"
,
"
else if ${1:condition}
{"
,
"
\t
$0"
,
"}"
],
"description"
:
"
Reverse for loop
"
"description"
:
"
else clause with a nested if statement
"
},
"
for loop
"
:
{
"prefix"
:
"
for
"
,
"
else
"
:
{
"prefix"
:
"
else
"
,
"body"
:
[
"
for var ${1:i} = 0; ${1:i} < ${2:length}; ${1:i}++
{"
,
"
else
{"
,
"
\t
$0"
,
"}"
],
"description"
:
"
for loop
"
"description"
:
"
else clause
"
},
"if
statemen
t"
:
{
"prefix"
:
"if"
,
"if
le
t"
:
{
"prefix"
:
"if
let
"
,
"body"
:
[
"if
${1:true
} {"
,
"if
let ${1:value} = ${2:optional
} {"
,
"
\t
$0"
,
"}"
],
"description"
:
"if statement"
"description"
:
"if statement
with optional binding
"
},
"
else-if statement
"
:
{
"prefix"
:
"
elif
"
,
"
guard
"
:
{
"prefix"
:
"
guard
"
,
"body"
:
[
"
else if ${1:true}
{"
,
"
guard ${1:condition} else
{"
,
"
\t
$0"
,
"}"
],
"description"
:
"
if
statement"
"description"
:
"
guard
statement"
},
"
Else statemen
t"
:
{
"prefix"
:
"
else
"
,
"
guard le
t"
:
{
"prefix"
:
"
guardlet
"
,
"body"
:
[
"else {"
,
"
guard let ${1:value} = ${2:optional}
else {"
,
"
\t
$0"
,
"}"
],
"description"
:
"
Else statement
"
"description"
:
"
guard statement with optional binding
"
},
"
Guard statement
"
:
{
"prefix"
:
"
guard
"
,
"
switch
"
:
{
"prefix"
:
"
switch
"
,
"body"
:
[
"guard let ${1:a} = ${2:optional} else {"
,
"switch ${1:value} {"
,
"case ${2:pattern}:"
,
"
\t
$0"
,
"default:"
,
"
\t
"
,
"}"
],
"description"
:
"
Guard
statement"
"description"
:
"
switch
statement"
},
"
Optional Binding statement
"
:
{
"prefix"
:
"
ifnil
"
,
"
do
"
:
{
"prefix"
:
"
do
"
,
"body"
:
[
"
if let ${1:a} = ${2:optional}
{"
,
"
do
{"
,
"
\t
$0"
,
"} catch ${1:error} {"
,
"
\t
$2"
,
"}"
],
"description"
:
"
Optional Binding
statement"
"description"
:
"
do
statement"
},
"
Switch statement
"
:
{
"prefix"
:
"
switch
"
,
"
func
"
:
{
"prefix"
:
"
func
"
,
"body"
:
[
"switch ${1:switch_on} {"
,
"case ${2:a}:"
,
"func ${1:name}(${2:parameters}) -> ${3:Type} {"
,
"
\t
$0"
,
"default:"
,
"
\t
$1"
,
"}"
],
"description"
:
"
Switch statement
"
"description"
:
"
function declaration
"
},
"
Do catch
"
:
{
"prefix"
:
"
docatch
"
,
"
struct
"
:
{
"prefix"
:
"
struct
"
,
"body"
:
[
"do {"
,
"
\t
try ${1:function that throws}"
,
"} catch ${2:pattern} {"
,
"struct ${1:Name} {"
,
""
,
"
\t
$0"
,
"}"
],
"description"
:
"
Try catch
"
"description"
:
"
struct declaration
"
},
"
E
num"
:
{
"
e
num"
:
{
"prefix"
:
"enum"
,
"body"
:
[
"enum ${1:Name} {"
,
""
,
"
\t
case $0"
,
"}"
],
"description"
:
"Enum"
"description"
:
"enum declaration"
},
"class"
:
{
"prefix"
:
"class"
,
"body"
:
[
"class ${1:Name} {"
,
""
,
"
\t
$0"
,
"}"
],
"description"
:
"class declaration"
},
"protocol"
:
{
"prefix"
:
"protocol"
,
"body"
:
[
"protocol ${1:Name} {"
,
""
,
"
\t
$0"
,
"}"
],
"description"
:
"protocol declaration"
},
"extension"
:
{
"prefix"
:
"extension"
,
"body"
:
[
"extension ${1:Type} {"
,
""
,
"
\t
$0"
,
"}"
],
"description"
:
"extension declaration"
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录