Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
code / usr / share / code / resources / app / extensions / swift / snippets / swift.json
Size: Mime:
{
	"print(\"...\")": {
		"prefix": "pr",
		"body": "print(\"$1\")$0"
	},
	"print(\"\\(...)\")": {
		"prefix": "po",
		"body": "print(\"\\($1)\")$0"
	},
	"repeat...while loop": {
		"prefix": "repeat",
		"body": [
			"repeat {",
			"	$0",
			"} while ${1:true}"
		],
		"description": "repeat...while loop"
	},
	"While loop": {
		"prefix": "while",
		"body": [
			"while ${1:true} {",
			"	$0",
			"}"
		],
		"description": "While loop"
	},
	"For-In statement": {
		"prefix": "forin",
		"body": [
			"for ${1:item} in ${2:collection} {",
			"	$0",
			"}"
		],
		"description": "For-In statement"
	},
	"Reverse for loop": {
		"prefix": "forr",
		"body": [
			"for var ${1:i} = ${2:length} - 1; ${1:i} >= 0; ${1:i}-- {",
			"	$0",
			"}"
		],
		"description": "Reverse for loop"
	},
	"for loop": {
		"prefix": "for",
		"body": [
			"for var ${1:i} = 0; ${1:i} < ${2:length}; ${1:i}++ {",
			"	$0",
			"}"
		],
		"description": "for loop"
	},
	"if statement": {
		"prefix": "if",
		"body": [
			"if ${1:true} {",
			"	$0",
			"}"
		],
		"description": "if statement"
	},
	"else-if statement": {
		"prefix": "elif",
		"body": [
			"else if ${1:true} {",
			"	$0",
			"}"
		],
		"description": "if statement"
	},
	"Else statement": {
		"prefix": "else",
		"body": [
			"else {",
			"	$0",
			"}"
		],
		"description": "Else statement"
	},
	"Guard statement": {
		"prefix": "guard",
		"body": [
			"guard let ${1:a} = ${2:optional} else {",
			"	$0",
			"}"
		],
		"description": "Guard statement"
	},
	"Optional Binding statement": {
		"prefix": "ifnil",
		"body": [
			"if let ${1:a} = ${2:optional} {",
			"	$0",
			"}"
		],
		"description": "Optional Binding statement"
	},
	"Switch statement": {
		"prefix": "switch",
		"body": [
			"switch ${1:switch_on} {",
			"case ${2:a}:",
			"	$0",
			"default:",
			"	$1",
			"}"
		],
		"description": "Switch statement"
	},
	"Do catch": {
		"prefix": "docatch",
		"body": [
			"do {",
			"	try ${1:function that throws}",
			"} catch ${2:pattern} {",
			"	$0",
			"}"
		],
		"description": "Try catch"
	},
	"Enum": {
		"prefix": "enum",
		"body": [
			"enum ${1:Name} {",
			"	case $0",
			"}"
		],
		"description": "Enum"
	}
}