Skip to content

Commit

Permalink
Added some basic erlang snippets.
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Sanders <msanders42@gmail.com>
  • Loading branch information
statik authored and Michael Sanders committed Aug 3, 2009
1 parent f28bf1d commit 6ffe172
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions snippets/erlang.snippets
@@ -0,0 +1,39 @@
# module and export all
snippet mod
-module(${1:`Filename('', 'my')`}).

-compile([export_all]).

start() ->
${2}

stop() ->
ok.
# define directive
snippet def
-define(${1:macro}, ${2:body}).${3}
# export directive
snippet exp
-export([${1:function}/${2:arity}]).
# include directive
snippet inc
-include("${1:file}").${2}
# behavior directive
snippet beh
-behaviour(${1:behaviour}).${2}
# if expression
snippet if
if
${1:guard} ->
${2:body}
end
# case expression
snippet case
case ${1:expression} of
${2:pattern} ->
${3:body};
end
# record directive
snippet rec
-record(${1:record}, {
${2:field}=${3:value}}).${4}

0 comments on commit 6ffe172

Please sign in to comment.