aboutsummaryrefslogtreecommitdiff
path: root/vim/bundle/vim-snippets/snippets/falcon.snippets
blob: c523980d6715f18198f1ceeb09ae395420578116 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
snippet #!
	#!/usr/bin/env falcon

# Import
snippet imp
	import ${0:module}

# Function
snippet fun
	function ${2:function_name}(${3})
		${0}
	end

# Class
snippet class
	class ${1:class_name}(${2:class_params})
		${0:/* members/methods */}
	end

# If
snippet if
	if ${1:condition}
		${0}
	end

# If else
snippet ife
	if ${1:condition}
		${0}
	else
	    ${1}
	end

# If else if
snippet eif
	elif ${1:condition}
		${0}

# Switch case
snippet switch
	switch ${1:expression}
		case ${2:item}
		case ${0:item}
		default
	end

# Select
snippet select
	select ${1:variable}
		case ${2:TypeSpec}
		case ${0:TypeSpec}
		default
	end

# For/in Loop
snippet forin
	for ${1:element} in ${2:container}
		${0}
	end

# For/to Loop
snippet forto
	for ${1:lowerbound} to ${2:upperbound}
		${0}
	end

# While Loop
snippet wh
	while ${1:conidition}
		${0}
	end