diff options
Diffstat (limited to 'emacs.d/snippets/text-mode/erlang-mode')
21 files changed, 103 insertions, 0 deletions
diff --git a/emacs.d/snippets/text-mode/erlang-mode/after b/emacs.d/snippets/text-mode/erlang-mode/after new file mode 100644 index 0000000..264e201 --- /dev/null +++ b/emacs.d/snippets/text-mode/erlang-mode/after @@ -0,0 +1,4 @@ +#name : after ... -> +# -- +after + $1 -> $0 diff --git a/emacs.d/snippets/text-mode/erlang-mode/begin b/emacs.d/snippets/text-mode/erlang-mode/begin new file mode 100644 index 0000000..7b48494 --- /dev/null +++ b/emacs.d/snippets/text-mode/erlang-mode/begin @@ -0,0 +1,5 @@ +#name : begin ... end +# -- +begin + $0 +end diff --git a/emacs.d/snippets/text-mode/erlang-mode/beh b/emacs.d/snippets/text-mode/erlang-mode/beh new file mode 100644 index 0000000..4975b26 --- /dev/null +++ b/emacs.d/snippets/text-mode/erlang-mode/beh @@ -0,0 +1,4 @@ +#name : -behaviour(...). +# -- +-behaviour(${1:gen_server}). +$0 diff --git a/emacs.d/snippets/text-mode/erlang-mode/case b/emacs.d/snippets/text-mode/erlang-mode/case new file mode 100644 index 0000000..5bed114 --- /dev/null +++ b/emacs.d/snippets/text-mode/erlang-mode/case @@ -0,0 +1,5 @@ +#name : case ... of ... end +# -- +case $1 of + $0 +end diff --git a/emacs.d/snippets/text-mode/erlang-mode/compile b/emacs.d/snippets/text-mode/erlang-mode/compile new file mode 100644 index 0000000..ae3a4d8 --- /dev/null +++ b/emacs.d/snippets/text-mode/erlang-mode/compile @@ -0,0 +1,4 @@ +#name : -compile(...). +# -- +-compile([${1:export_all}]). +$0 diff --git a/emacs.d/snippets/text-mode/erlang-mode/def b/emacs.d/snippets/text-mode/erlang-mode/def new file mode 100644 index 0000000..6fb92f1 --- /dev/null +++ b/emacs.d/snippets/text-mode/erlang-mode/def @@ -0,0 +1,4 @@ +#name : -define(...,...). +# -- +-define($1,$2). +$0 diff --git a/emacs.d/snippets/text-mode/erlang-mode/exp b/emacs.d/snippets/text-mode/erlang-mode/exp new file mode 100644 index 0000000..67f56da --- /dev/null +++ b/emacs.d/snippets/text-mode/erlang-mode/exp @@ -0,0 +1,5 @@ +#name : -export([]). +#contributor : hitesh <hitesh.jasani@gmail.com> +# -- +-export([${1:start/0}]). +$0 diff --git a/emacs.d/snippets/text-mode/erlang-mode/fun b/emacs.d/snippets/text-mode/erlang-mode/fun new file mode 100644 index 0000000..77f8293 --- /dev/null +++ b/emacs.d/snippets/text-mode/erlang-mode/fun @@ -0,0 +1,3 @@ +#name : fun (...) -> ... end +# -- +fun ($1) -> $0 end diff --git a/emacs.d/snippets/text-mode/erlang-mode/if b/emacs.d/snippets/text-mode/erlang-mode/if new file mode 100644 index 0000000..45674c4 --- /dev/null +++ b/emacs.d/snippets/text-mode/erlang-mode/if @@ -0,0 +1,6 @@ +#name : if ... -> ... ; true -> ... end +# -- +if + $1 -> $2; + true -> $0 +end diff --git a/emacs.d/snippets/text-mode/erlang-mode/ifdef b/emacs.d/snippets/text-mode/erlang-mode/ifdef new file mode 100644 index 0000000..ea89ecf --- /dev/null +++ b/emacs.d/snippets/text-mode/erlang-mode/ifdef @@ -0,0 +1,5 @@ +#name : -ifdef(...). ... -endif. +# -- +-ifdef($1). +$0 +-endif. diff --git a/emacs.d/snippets/text-mode/erlang-mode/ifndef b/emacs.d/snippets/text-mode/erlang-mode/ifndef new file mode 100644 index 0000000..dcd67a7 --- /dev/null +++ b/emacs.d/snippets/text-mode/erlang-mode/ifndef @@ -0,0 +1,5 @@ +#name : -ifndef(...). ... -endif. +# -- +-ifndef($1). +$0 +-endif. diff --git a/emacs.d/snippets/text-mode/erlang-mode/imp b/emacs.d/snippets/text-mode/erlang-mode/imp new file mode 100644 index 0000000..c035ddd --- /dev/null +++ b/emacs.d/snippets/text-mode/erlang-mode/imp @@ -0,0 +1,5 @@ +#name : -import([]). +#contributor : hitesh <hitesh.jasani@gmail.com> +# -- +-import(${1:lists}, [${2:map/2, sum/1}]). +$0 diff --git a/emacs.d/snippets/text-mode/erlang-mode/inc b/emacs.d/snippets/text-mode/erlang-mode/inc new file mode 100644 index 0000000..f7b2161 --- /dev/null +++ b/emacs.d/snippets/text-mode/erlang-mode/inc @@ -0,0 +1,4 @@ +#name : -include("..."). +# -- +-include("$1"). +$0 diff --git a/emacs.d/snippets/text-mode/erlang-mode/inc.lib b/emacs.d/snippets/text-mode/erlang-mode/inc.lib new file mode 100644 index 0000000..09a6723 --- /dev/null +++ b/emacs.d/snippets/text-mode/erlang-mode/inc.lib @@ -0,0 +1,4 @@ +#name : -include_lib("..."). +# -- +-include_lib("$1"). +$0 diff --git a/emacs.d/snippets/text-mode/erlang-mode/loop b/emacs.d/snippets/text-mode/erlang-mode/loop new file mode 100644 index 0000000..0205802 --- /dev/null +++ b/emacs.d/snippets/text-mode/erlang-mode/loop @@ -0,0 +1,8 @@ +#name : loop(...) -> receive _ -> loop(...) end. +# -- +${1:loop}($2) -> + receive + ${3:_} -> + $1($2) + end. +$0 diff --git a/emacs.d/snippets/text-mode/erlang-mode/mod b/emacs.d/snippets/text-mode/erlang-mode/mod new file mode 100644 index 0000000..7275d39 --- /dev/null +++ b/emacs.d/snippets/text-mode/erlang-mode/mod @@ -0,0 +1,6 @@ +#name : -module(). +#contributor : hitesh <hitesh.jasani@gmail.com> +# -- +-module(${1:`(file-name-nondirectory + (file-name-sans-extension (or (buffer-file-name) (buffer-name))))`}). +$0 diff --git a/emacs.d/snippets/text-mode/erlang-mode/rcv b/emacs.d/snippets/text-mode/erlang-mode/rcv new file mode 100644 index 0000000..804fb3f --- /dev/null +++ b/emacs.d/snippets/text-mode/erlang-mode/rcv @@ -0,0 +1,5 @@ +#name : receive ... -> ... end +# -- +receive + $1 -> $0 +end diff --git a/emacs.d/snippets/text-mode/erlang-mode/rcv.after b/emacs.d/snippets/text-mode/erlang-mode/rcv.after new file mode 100644 index 0000000..51046df --- /dev/null +++ b/emacs.d/snippets/text-mode/erlang-mode/rcv.after @@ -0,0 +1,6 @@ +#name : receive after ... -> ... end +# -- +receive +after + $1 -> $0 +end diff --git a/emacs.d/snippets/text-mode/erlang-mode/rec b/emacs.d/snippets/text-mode/erlang-mode/rec new file mode 100644 index 0000000..0d67834 --- /dev/null +++ b/emacs.d/snippets/text-mode/erlang-mode/rec @@ -0,0 +1,4 @@ +#name : -record(...,{...}). +# -- +-record($1,{$2}). +$0 diff --git a/emacs.d/snippets/text-mode/erlang-mode/try b/emacs.d/snippets/text-mode/erlang-mode/try new file mode 100644 index 0000000..fa5c9c2 --- /dev/null +++ b/emacs.d/snippets/text-mode/erlang-mode/try @@ -0,0 +1,7 @@ +#name : try ... of ... catch after end +# -- +try $1 of + $0 +catch +after +end diff --git a/emacs.d/snippets/text-mode/erlang-mode/undef b/emacs.d/snippets/text-mode/erlang-mode/undef new file mode 100644 index 0000000..7ab5dd4 --- /dev/null +++ b/emacs.d/snippets/text-mode/erlang-mode/undef @@ -0,0 +1,4 @@ +#name : -undef(...). +# -- +-undef($1). +$0 |