-
Notifications
You must be signed in to change notification settings - Fork 230
/
Copy pathelixir.snip
119 lines (101 loc) · 1.84 KB
/
elixir.snip
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
snippet do
abbr do...end
options head
do
${1:TARGET}
end
snippet if
abbr if .. do .. end
options head
if ${1:true} do
${2:TARGET}
end
snippet ife
abbr if .. do .. else .. end
options head
if ${1:true} do
${2:ok}
else
${3:ok}
end
snippet case
abbr case .. end
options head
case ${1} do
${2} -> ${3}
end
snippet def
abbr def .. do .. end
options head
def ${1:name} do
${2:TARGET}
end
snippet defm
abbr def module
options head
defmodule ${1:module_name} do
${2:TARGET}
end
snippet defp
abbr defp .. end
options head
defp ${1:name} do
${2:TARGET}
end
snippet doc
abbr @doc """..."""
options head
@doc """${0:TARGET}"""
snippet mdoc
abbr @moduledoc """..."""
options head
@moduledoc """${0:TARGET}"""
snippet fn
abbr fn(..) -> .. end
options head
fn(${1:args}) -> ${2:TARGET} end
snippet rec
abbr receive .. do .. end
options head
receive do
${1} -> ${2}
end
snippet test
abbr test .. do .. end
options head
test "${1:test_name}" do
${2:TARGET}
end
snippet try
abbr try .. rescue .. end
options head
try do
${1:TARGET}
rescue
${2} -> ${3}
snippet with
abbr with .. do .. end
options head
with ${1}
do
${2:TARGET}
end
snippet describe
abbr describe .. do .. end
options head
describe "${1:describe_name}" do
${2:TARGET}
end
snippet puts
IO.puts(${1})
snippet p
abbr IO.inspect()
IO.inspect(${1})
snippet main
options head
defmodule Main do
def main do
${1:TARGET}
end
end
Main.main