]> git.r.bdr.sh - rbdr/dotfiles/blame_incremental - vim/snippets/erlang.snippets
Update vim
[rbdr/dotfiles] / vim / snippets / erlang.snippets
... / ...
CommitLineData
1# module and export all
2snippet mod
3 -module(${1:`Filename('', 'my')`}).
4
5 -compile([export_all]).
6
7 start() ->
8 ${2}
9
10 stop() ->
11 ok.
12# define directive
13snippet def
14 -define(${1:macro}, ${2:body}).${3}
15# export directive
16snippet exp
17 -export([${1:function}/${2:arity}]).
18# include directive
19snippet inc
20 -include("${1:file}").${2}
21# behavior directive
22snippet beh
23 -behaviour(${1:behaviour}).${2}
24# if expression
25snippet if
26 if
27 ${1:guard} ->
28 ${2:body}
29 end
30# case expression
31snippet case
32 case ${1:expression} of
33 ${2:pattern} ->
34 ${3:body};
35 end
36# record directive
37snippet rec
38 -record(${1:record}, {
39 ${2:field}=${3:value}}).${4}