2013-03-17 15:13:47 -04:00
|
|
|
###########################################################################
|
|
|
|
# TEXTMATE SNIPPETS #
|
|
|
|
###########################################################################
|
|
|
|
|
2014-02-26 03:31:33 -05:00
|
|
|
priority -50
|
|
|
|
|
2013-03-17 15:13:47 -04:00
|
|
|
snippet pat "Case:Receive:Try Clause"
|
2015-01-24 12:12:29 -05:00
|
|
|
${1:pattern}${2: when ${3:guard}} ->
|
2013-03-17 15:13:47 -04:00
|
|
|
${4:body}
|
|
|
|
endsnippet
|
|
|
|
|
2015-01-24 12:12:29 -05:00
|
|
|
snippet beh "Behaviour Directive" b
|
|
|
|
-behaviour(${1:behaviour}).
|
2013-03-17 15:13:47 -04:00
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet case "Case Expression"
|
|
|
|
case ${1:expression} of
|
|
|
|
${2:pattern}${3: when ${4:guard}} ->
|
|
|
|
${5:body}
|
|
|
|
end
|
|
|
|
endsnippet
|
|
|
|
|
2015-01-24 12:12:29 -05:00
|
|
|
snippet def "Define Directive" b
|
|
|
|
-define(${1:macro}${2: (${3:param})}, ${4:body}).
|
2013-03-17 15:13:47 -04:00
|
|
|
endsnippet
|
|
|
|
|
2015-01-24 12:12:29 -05:00
|
|
|
snippet exp "Export Directive" b
|
|
|
|
-export([${1:function}/${2:arity}]).
|
2013-03-17 15:13:47 -04:00
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet fun "Fun Expression"
|
|
|
|
fun
|
|
|
|
(${1:pattern})${2: when ${3:guard}} ->
|
|
|
|
${4:body}
|
|
|
|
end
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet fu "Function"
|
2015-01-24 12:12:29 -05:00
|
|
|
${1:function}(${2:param})${3: when ${4:guard}} ->
|
2013-03-17 15:13:47 -04:00
|
|
|
${5:body}
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet if "If Expression"
|
|
|
|
if
|
|
|
|
${1:guard} ->
|
|
|
|
${2:body}
|
|
|
|
end
|
|
|
|
endsnippet
|
|
|
|
|
2015-01-24 12:12:29 -05:00
|
|
|
snippet ifdef "Ifdef Directive" b
|
|
|
|
-ifdef(${1:macro}).
|
2013-03-17 15:13:47 -04:00
|
|
|
endsnippet
|
|
|
|
|
2015-01-24 12:12:29 -05:00
|
|
|
snippet ifndef "Ifndef Directive" b
|
|
|
|
-ifndef(${1:macro}).
|
2013-03-17 15:13:47 -04:00
|
|
|
endsnippet
|
|
|
|
|
2015-01-24 12:12:29 -05:00
|
|
|
snippet imp "Import Directive" b
|
|
|
|
-import(${1:module}, [${2:function}/${3:arity}]).
|
2013-03-17 15:13:47 -04:00
|
|
|
endsnippet
|
|
|
|
|
2015-01-24 12:12:29 -05:00
|
|
|
snippet inc "Include Directive" b
|
|
|
|
-include("${1:file}").
|
2013-03-17 15:13:47 -04:00
|
|
|
endsnippet
|
|
|
|
|
2015-01-24 12:12:29 -05:00
|
|
|
snippet mod "Module Directive" b
|
|
|
|
-module(${1:`!p snip.rv = snip.basename or "module"`}).
|
2013-03-17 15:13:47 -04:00
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet rcv "Receive Expression"
|
|
|
|
receive
|
|
|
|
${1: ${2:pattern}${3: when ${4:guard}} ->
|
|
|
|
${5:body}}
|
|
|
|
${6:after
|
|
|
|
${7:expression} ->
|
|
|
|
${8:body}}
|
|
|
|
end
|
|
|
|
endsnippet
|
|
|
|
|
2015-01-24 12:12:29 -05:00
|
|
|
snippet rec "Record Directive" b
|
|
|
|
-record(${1:record}, {${2:field}${3: = ${4:value}}}).
|
2013-03-17 15:13:47 -04:00
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet try "Try Expression"
|
|
|
|
try${1: ${2:expression}${3: of
|
|
|
|
${4:pattern}${5: when ${6:guard}} ->
|
|
|
|
${7:body}}}
|
|
|
|
${8:catch
|
|
|
|
${9:pattern}${10: when ${11:guard}} ->
|
|
|
|
${12:body}}
|
|
|
|
${13:after
|
|
|
|
${14:body}}
|
|
|
|
end
|
|
|
|
endsnippet
|
|
|
|
|
2015-01-24 12:12:29 -05:00
|
|
|
snippet undef "Undef Directive" b
|
|
|
|
-undef(${1:macro}).
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet || "List Comprehension"
|
|
|
|
[${1:X} || ${2:X} <- ${3:List}${4:, gen}]
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet gen "Generator Expression"
|
|
|
|
${1:X} <- ${2:List}${3:, gen}
|
2013-03-17 15:13:47 -04:00
|
|
|
endsnippet
|
|
|
|
|
|
|
|
# vim:ft=snippets:
|