restructuring classic snippets dir to conform to new parenting specs

This commit is contained in:
capitaomorte
2009-12-25 14:05:23 +00:00
parent eebdf516b2
commit 4426d044f6
418 changed files with 16 additions and 0 deletions

View File

@@ -0,0 +1 @@
text-mode

View File

@@ -0,0 +1,4 @@
#name : after ... ->
# --
after
$1 -> $0

View File

@@ -0,0 +1,5 @@
#name : begin ... end
# --
begin
$0
end

4
snippets/erlang-mode/beh Normal file
View File

@@ -0,0 +1,4 @@
#name : -behaviour(...).
# --
-behaviour(${1:gen_server}).
$0

View File

@@ -0,0 +1,5 @@
#name : case ... of ... end
# --
case $1 of
$0
end

View File

@@ -0,0 +1,4 @@
#name : -compile(...).
# --
-compile([${1:export_all}]).
$0

4
snippets/erlang-mode/def Normal file
View File

@@ -0,0 +1,4 @@
#name : -define(...,...).
# --
-define($1,$2).
$0

5
snippets/erlang-mode/exp Normal file
View File

@@ -0,0 +1,5 @@
#name : -export([]).
#contributor : hitesh <hitesh.jasani@gmail.com>
# --
-export([${1:start/0}]).
$0

3
snippets/erlang-mode/fun Normal file
View File

@@ -0,0 +1,3 @@
#name : fun (...) -> ... end
# --
fun ($1) -> $0 end

6
snippets/erlang-mode/if Normal file
View File

@@ -0,0 +1,6 @@
#name : if ... -> ... ; true -> ... end
# --
if
$1 -> $2;
true -> $0
end

View File

@@ -0,0 +1,5 @@
#name : -ifdef(...). ... -endif.
# --
-ifdef($1).
$0
-endif.

View File

@@ -0,0 +1,5 @@
#name : -ifndef(...). ... -endif.
# --
-ifndef($1).
$0
-endif.

5
snippets/erlang-mode/imp Normal file
View File

@@ -0,0 +1,5 @@
#name : -import([]).
#contributor : hitesh <hitesh.jasani@gmail.com>
# --
-import(${1:lists}, [${2:map/2, sum/1}]).
$0

4
snippets/erlang-mode/inc Normal file
View File

@@ -0,0 +1,4 @@
#name : -include("...").
# --
-include("$1").
$0

View File

@@ -0,0 +1,4 @@
#name : -include_lib("...").
# --
-include_lib("$1").
$0

View File

@@ -0,0 +1,8 @@
#name : loop(...) -> receive _ -> loop(...) end.
# --
${1:loop}($2) ->
receive
${3:_} ->
$1($2)
end.
$0

6
snippets/erlang-mode/mod Normal file
View File

@@ -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

5
snippets/erlang-mode/rcv Normal file
View File

@@ -0,0 +1,5 @@
#name : receive ... -> ... end
# --
receive
$1 -> $0
end

View File

@@ -0,0 +1,6 @@
#name : receive after ... -> ... end
# --
receive
after
$1 -> $0
end

4
snippets/erlang-mode/rec Normal file
View File

@@ -0,0 +1,4 @@
#name : -record(...,{...}).
# --
-record($1,{$2}).
$0

7
snippets/erlang-mode/try Normal file
View File

@@ -0,0 +1,7 @@
#name : try ... of ... catch after end
# --
try $1 of
$0
catch
after
end

View File

@@ -0,0 +1,4 @@
#name : -undef(...).
# --
-undef($1).
$0