[swift] fix invalid characters in snippets

This commit is contained in:
Martin Aeschlimann 2017-09-25 23:12:02 +02:00
parent 9aa5965a3c
commit 595010f896

View file

@ -11,7 +11,7 @@
"prefix": "repeat", "prefix": "repeat",
"body": [ "body": [
"repeat {", "repeat {",
" $0", "\t$0",
"} while ${1:true}" "} while ${1:true}"
], ],
"description": "repeat...while loop" "description": "repeat...while loop"
@ -20,7 +20,7 @@
"prefix": "while", "prefix": "while",
"body": [ "body": [
"while ${1:true} {", "while ${1:true} {",
" $0", "\t$0",
"}" "}"
], ],
"description": "While loop" "description": "While loop"
@ -29,7 +29,7 @@
"prefix": "forin", "prefix": "forin",
"body": [ "body": [
"for ${1:item} in ${2:collection} {", "for ${1:item} in ${2:collection} {",
" $0", "\t$0",
"}" "}"
], ],
"description": "For-In statement" "description": "For-In statement"
@ -38,7 +38,7 @@
"prefix": "forr", "prefix": "forr",
"body": [ "body": [
"for var ${1:i} = ${2:length} - 1; ${1:i} >= 0; ${1:i}-- {", "for var ${1:i} = ${2:length} - 1; ${1:i} >= 0; ${1:i}-- {",
" $0", "\t$0",
"}" "}"
], ],
"description": "Reverse for loop" "description": "Reverse for loop"
@ -47,7 +47,7 @@
"prefix": "for", "prefix": "for",
"body": [ "body": [
"for var ${1:i} = 0; ${1:i} < ${2:length}; ${1:i}++ {", "for var ${1:i} = 0; ${1:i} < ${2:length}; ${1:i}++ {",
" $0", "\t$0",
"}" "}"
], ],
"description": "for loop" "description": "for loop"
@ -56,7 +56,7 @@
"prefix": "if", "prefix": "if",
"body": [ "body": [
"if ${1:true} {", "if ${1:true} {",
" $0", "\t$0",
"}" "}"
], ],
"description": "if statement" "description": "if statement"
@ -65,7 +65,7 @@
"prefix": "elif", "prefix": "elif",
"body": [ "body": [
"else if ${1:true} {", "else if ${1:true} {",
" $0", "\t$0",
"}" "}"
], ],
"description": "if statement" "description": "if statement"
@ -74,7 +74,7 @@
"prefix": "else", "prefix": "else",
"body": [ "body": [
"else {", "else {",
" $0", "\t$0",
"}" "}"
], ],
"description": "Else statement" "description": "Else statement"
@ -83,7 +83,7 @@
"prefix": "guard", "prefix": "guard",
"body": [ "body": [
"guard let ${1:a} = ${2:optional} else {", "guard let ${1:a} = ${2:optional} else {",
" $0", "\t$0",
"}" "}"
], ],
"description": "Guard statement" "description": "Guard statement"
@ -92,7 +92,7 @@
"prefix": "ifnil", "prefix": "ifnil",
"body": [ "body": [
"if let ${1:a} = ${2:optional} {", "if let ${1:a} = ${2:optional} {",
" $0", "\t$0",
"}" "}"
], ],
"description": "Optional Binding statement" "description": "Optional Binding statement"
@ -102,9 +102,9 @@
"body": [ "body": [
"switch ${1:switch_on} {", "switch ${1:switch_on} {",
"case ${2:a}:", "case ${2:a}:",
" $0", "\t$0",
"default:", "default:",
" $1", "\t$1",
"}" "}"
], ],
"description": "Switch statement" "description": "Switch statement"
@ -113,9 +113,9 @@
"prefix": "docatch", "prefix": "docatch",
"body": [ "body": [
"do {", "do {",
" try ${1:function that throws}", "\ttry ${1:function that throws}",
"} catch ${2:pattern} {", "} catch ${2:pattern} {",
" $0", "\t$0",
"}" "}"
], ],
"description": "Try catch" "description": "Try catch"
@ -124,7 +124,7 @@
"prefix": "enum", "prefix": "enum",
"body": [ "body": [
"enum ${1:Name} {", "enum ${1:Name} {",
" case $0", "\tcase $0",
"}" "}"
], ],
"description": "Enum" "description": "Enum"