2013-07-17 23:06:05 +00:00
|
|
|
snippet do
|
|
|
|
do
|
2013-11-16 19:45:48 +00:00
|
|
|
${0}
|
2013-07-17 23:06:05 +00:00
|
|
|
end
|
|
|
|
snippet if if .. do .. end
|
|
|
|
if ${1} do
|
2013-11-16 19:45:48 +00:00
|
|
|
${0}
|
2013-07-17 23:06:05 +00:00
|
|
|
end
|
|
|
|
snippet if if .. do: ..
|
2013-11-16 19:45:48 +00:00
|
|
|
if ${1:condition}, do: ${0}
|
2013-07-17 23:06:05 +00:00
|
|
|
snippet ife if .. do .. else .. end
|
|
|
|
if ${1:condition} do
|
|
|
|
${2}
|
|
|
|
else
|
2013-11-16 19:45:48 +00:00
|
|
|
${0}
|
2013-07-17 23:06:05 +00:00
|
|
|
end
|
|
|
|
snippet ife if .. do: .. else:
|
2013-11-16 19:45:48 +00:00
|
|
|
if ${1:condition}, do: ${2}, else: ${0}
|
2013-07-17 23:06:05 +00:00
|
|
|
snippet unless unless .. do .. end
|
|
|
|
unless ${1} do
|
2013-11-16 19:45:48 +00:00
|
|
|
${0}
|
2013-07-17 23:06:05 +00:00
|
|
|
end
|
|
|
|
snippet unless unless .. do: ..
|
2013-11-16 19:45:48 +00:00
|
|
|
unless ${1:condition}, do: ${0}
|
2013-07-17 23:06:05 +00:00
|
|
|
snippet unlesse unless .. do .. else .. end
|
|
|
|
unless ${1:condition} do
|
|
|
|
${2}
|
|
|
|
else
|
2013-11-16 19:45:48 +00:00
|
|
|
${0}
|
2013-07-17 23:06:05 +00:00
|
|
|
end
|
|
|
|
snippet unlesse unless .. do: .. else:
|
2013-11-16 19:45:48 +00:00
|
|
|
unless ${1:condition}, do: ${2}, else: ${0}
|
2013-07-17 23:06:05 +00:00
|
|
|
snippet cond
|
|
|
|
cond do
|
|
|
|
${1} ->
|
2013-11-16 19:45:48 +00:00
|
|
|
${0}
|
2013-07-17 23:06:05 +00:00
|
|
|
end
|
|
|
|
snippet case
|
|
|
|
case ${1} do
|
|
|
|
${2} ->
|
2013-11-16 19:45:48 +00:00
|
|
|
${0}
|
2013-07-17 23:06:05 +00:00
|
|
|
end
|
2014-03-02 14:35:00 +00:00
|
|
|
snippet df
|
|
|
|
def ${1:name}, do: ${2}
|
2013-07-17 23:06:05 +00:00
|
|
|
snippet def
|
|
|
|
def ${1:name} do
|
2013-11-16 19:45:48 +00:00
|
|
|
${0}
|
2013-07-17 23:06:05 +00:00
|
|
|
end
|
|
|
|
snippet defim
|
|
|
|
defimpl ${1:protocol_name}, for: ${2:data_type} do
|
2013-11-16 19:45:48 +00:00
|
|
|
${0}
|
2013-07-17 23:06:05 +00:00
|
|
|
end
|
|
|
|
snippet defma
|
|
|
|
defmacro ${1:name} do
|
2013-11-16 19:45:48 +00:00
|
|
|
${0}
|
2013-07-17 23:06:05 +00:00
|
|
|
end
|
|
|
|
snippet defmo
|
|
|
|
defmodule ${1:module_name} do
|
2013-11-16 19:45:48 +00:00
|
|
|
${0}
|
2013-07-17 23:06:05 +00:00
|
|
|
end
|
|
|
|
snippet defp
|
|
|
|
defp ${1:name} do
|
2013-11-16 19:45:48 +00:00
|
|
|
${0}
|
2013-07-17 23:06:05 +00:00
|
|
|
end
|
|
|
|
snippet defpr
|
2013-11-16 19:45:48 +00:00
|
|
|
defprotocol ${1:name}, [${0:function}]
|
2013-07-17 23:06:05 +00:00
|
|
|
snippet defr
|
2013-11-16 19:45:48 +00:00
|
|
|
defrecord ${1:record_name}, ${0:fields}
|
2013-07-17 23:06:05 +00:00
|
|
|
snippet doc
|
|
|
|
@doc """
|
2013-11-16 19:45:48 +00:00
|
|
|
${0}
|
2013-07-17 23:06:05 +00:00
|
|
|
"""
|
|
|
|
snippet fn
|
2013-11-16 19:45:48 +00:00
|
|
|
fn(${1:args}) -> ${0} end
|
2013-08-03 12:50:12 +00:00
|
|
|
snippet fun
|
2014-07-02 11:18:18 +00:00
|
|
|
function do
|
|
|
|
${0}
|
|
|
|
end
|
2013-07-17 23:06:05 +00:00
|
|
|
snippet mdoc
|
|
|
|
@moduledoc """
|
2013-11-16 19:45:48 +00:00
|
|
|
${0}
|
2013-07-17 23:06:05 +00:00
|
|
|
"""
|
|
|
|
snippet rec
|
|
|
|
receive do
|
|
|
|
${1} ->
|
2013-11-16 19:45:48 +00:00
|
|
|
${0}
|
2013-07-17 23:06:05 +00:00
|
|
|
end
|
|
|
|
snippet req
|
2013-11-16 19:45:48 +00:00
|
|
|
require ${0:module_name}
|
2013-07-17 23:06:05 +00:00
|
|
|
snippet imp
|
2013-11-16 19:45:48 +00:00
|
|
|
import ${0:module_name}
|
2013-07-17 23:06:05 +00:00
|
|
|
snippet ali
|
2013-11-16 19:45:48 +00:00
|
|
|
alias ${0:module_name}
|
2013-07-17 23:06:05 +00:00
|
|
|
snippet test
|
|
|
|
test "${1:test_name}" do
|
2013-11-16 19:45:48 +00:00
|
|
|
${0}
|
2013-07-17 23:06:05 +00:00
|
|
|
end
|
|
|
|
snippet try try .. rescue .. end
|
|
|
|
try do
|
|
|
|
${1}
|
|
|
|
rescue
|
2013-11-16 19:45:48 +00:00
|
|
|
${2} -> ${0}
|
2013-07-17 23:06:05 +00:00
|
|
|
end
|