config/snippets/Erlang.rb in ver-2010.02 vs config/snippets/Erlang.rb in ver-2010.08
- old
+ new
@@ -1,70 +1,111 @@
# Encoding: UTF-8
-{nil =>
- {scope: "source.erlang",
- name: "Function",
- content: "${1:function} (${2:param})${3: when ${4:guard}} ->\n\t${5:body}"},
- "beh" =>
- {scope: "source.erlang",
- name: "Behaviour Directive",
- content: "-behaviour (${1:behaviour})."},
- "case" =>
- {scope: "source.erlang",
- name: "Case Expression",
- content:
- "case ${1:expression} of\n\t${2:pattern}${3: when ${4:guard}} ->\n\t\t${5:body}\nend"},
- "def" =>
- {scope: "source.erlang",
- name: "Define Directive",
- content: "-define (${1:macro}${2: (${3:param})}, ${4:body})."},
- "exp" =>
- {scope: "source.erlang",
- name: "Export Directive",
- content: "-export ([${1:function}/${2:arity}])."},
- "fun" =>
- {scope: "source.erlang",
- name: "Fun Expression",
- content:
- "fun\n\t(${1:pattern})${2: when ${3:guard}} ->\n\t\t${4:body}\nend"},
- "if" =>
- {scope: "source.erlang",
- name: "If Expression",
- content: "if\n\t${1:guard} ->\n\t\t${2:body}\nend"},
- "ifdef" =>
- {scope: "source.erlang",
- name: "Ifdef Directive",
- content: "-ifdef (${1:macro})."},
- "ifndef" =>
- {scope: "source.erlang",
- name: "Ifndef Directive",
- content: "-ifndef (${1:macro})."},
- "imp" =>
- {scope: "source.erlang",
- name: "Import Directive",
- content: "-import (${1:module}, [${2:function}/${3:arity}])."},
- "inc" =>
- {scope: "source.erlang",
- name: "Include Directive",
- content: "-include (\"${1:file}\")."},
- "mod" =>
- {scope: "source.erlang",
- name: "Module Directive",
- content: "-module (${1:${TM_FILEPATH/^.*\\/(.*)\\.erl$/$1/g}})."},
- "rcv" =>
- {scope: "source.erlang",
- name: "Receive Expression",
- content:
- "receive\n${1:\t${2:pattern}${3: when ${4:guard}} ->\n\t\t${5:body}\n}${6:after\n\t${7:expression} ->\n\t\t${8:body}\n}end"},
- "rec" =>
- {scope: "source.erlang",
- name: "Record Directive",
- content: "-record (${1:record}, {${2:field}${3: = ${4:value}}})."},
- "try" =>
- {scope: "source.erlang",
- name: "Try Expression",
- content:
- "try${1: ${2:expression}${3: of\n\t${4:pattern}${5: when ${6:guard}} ->\n\t\t${7:body}}}\n${8:catch\n\t${9:pattern}${10: when ${11:guard}} ->\n\t\t${12:body}}\n${13:after\n\t${14:body}}\nend"},
- "undef" =>
- {scope: "source.erlang",
- name: "Undef Directive",
- content: "-undef (${1:macro})."}}
+[{content: "${1:pattern}${2: when ${3:guard}} ->\n\t${4:body}",
+ name: "(Case/Receive/Try Clause)",
+ scope: "source.erlang",
+ uuid: "756D50E8-C3E9-4ACD-B246-031E4D91D807"},
+ {content: "(${1:pattern})${2: when ${3:guard}} ->\n\t${4:body}",
+ name: "(Fun Clause)",
+ scope: "source.erlang",
+ uuid: "15DF3174-A8CD-40DA-BE74-B991425BA9EB"},
+ {content: "${1:function} (${2:param})${3: when ${4:guard}} ->\n\t${5:body}",
+ name: "(Function Clause)",
+ scope: "source.erlang",
+ uuid: "AF80483E-996B-44E8-A76D-8CD7AA3CDB8B"},
+ {content: "${1:guard} ->\n\t${2:body}",
+ name: "(If Clause)",
+ scope: "source.erlang",
+ uuid: "0DD90D8B-3DE0-4A8B-BA82-737375D4E5CB"},
+ {content: "-behaviour (${1:behaviour}).",
+ name: "Behaviour Directive",
+ scope: "source.erlang",
+ tabTrigger: "beh",
+ uuid: "30CF71AF-5DB6-4DFA-934D-0E1747657644"},
+ {content:
+ "case ${1:expression} of\n\t${2:pattern}${3: when ${4:guard}} ->\n\t\t${5:body}\nend",
+ name: "Case Expression",
+ scope: "source.erlang",
+ tabTrigger: "case",
+ uuid: "E6AD8350-0670-42D8-9E1C-8F0853B23DE1"},
+ {content: "-define (${1:macro}${2: (${3:param})}, ${4:body}).",
+ name: "Define Directive",
+ scope: "source.erlang",
+ tabTrigger: "def",
+ uuid: "307A33A1-CA17-4BF6-BE38-0C749055F711"},
+ {content: "-export ([${1:function}/${2:arity}]).",
+ name: "Export Directive",
+ scope: "source.erlang",
+ tabTrigger: "exp",
+ uuid: "A3AF4B3B-A3F0-4501-B7A2-9F22AE51DAC5"},
+ {content: ", ${1:field}${2: = ${3:value}}",
+ keyEquivalent: "^,",
+ name: "Field & Value",
+ scope: "source.erlang meta.structure.record",
+ uuid: "2842C13E-C4F3-4DD4-86CE-C008A0AA461D"},
+ {content: "fun\n\t(${1:pattern})${2: when ${3:guard}} ->\n\t\t${4:body}\nend",
+ name: "Fun Expression",
+ scope: "source.erlang",
+ tabTrigger: "fun",
+ uuid: "44772708-584C-4357-926E-50DDFBFF66C0"},
+ {content: "${1:function} (${2:param})${3: when ${4:guard}} ->\n\t${5:body}",
+ keyEquivalent: "^F",
+ name: "Function",
+ scope: "source.erlang",
+ uuid: "C7FAC8F8-F843-4F5B-8FE4-217ECEF1E543"},
+ {content: ", ${1:function}/${2:arity}",
+ keyEquivalent: "^,",
+ name: "Function & Arity",
+ scope: "source.erlang meta.structure.list.function",
+ uuid: "BF4EBA8B-65B6-40A5-B8BA-64B7EC13F40B"},
+ {content: "if\n\t${1:guard} ->\n\t\t${2:body}\nend",
+ name: "If Expression",
+ scope: "source.erlang",
+ tabTrigger: "if",
+ uuid: "868B3F48-6567-43BD-ABA1-54718DCBDE5E"},
+ {content: "-ifdef (${1:macro}).",
+ name: "Ifdef Directive",
+ scope: "source.erlang",
+ tabTrigger: "ifdef",
+ uuid: "780100D7-AF4F-440D-B3E9-1B4603B5984F"},
+ {content: "-ifndef (${1:macro}).",
+ name: "Ifndef Directive",
+ scope: "source.erlang",
+ tabTrigger: "ifndef",
+ uuid: "A30E3888-8EA6-4DD9-BE1C-97BDBF5E09A5"},
+ {content: "-import (${1:module}, [${2:function}/${3:arity}]).",
+ name: "Import Directive",
+ scope: "source.erlang",
+ tabTrigger: "imp",
+ uuid: "E06CB3C5-2202-4BA7-B651-21B437427BA3"},
+ {content: "-include (\"${1:file}\").",
+ name: "Include Directive",
+ scope: "source.erlang",
+ tabTrigger: "inc",
+ uuid: "6882D307-5022-459D-BDA3-EA33BD8AF947"},
+ {content: "-module (${1:${TM_FILEPATH/^.*\\/(.*)\\.erl$/$1/g}}).",
+ name: "Module Directive",
+ scope: "source.erlang",
+ tabTrigger: "mod",
+ uuid: "C27C322E-0E88-4404-9AD1-218D7617CF14"},
+ {content:
+ "receive\n${1:\t${2:pattern}${3: when ${4:guard}} ->\n\t\t${5:body}\n}${6:after\n\t${7:expression} ->\n\t\t${8:body}\n}end",
+ name: "Receive Expression",
+ scope: "source.erlang",
+ tabTrigger: "rcv",
+ uuid: "26D57EA7-1098-419B-B96C-8B90CCC57654"},
+ {content: "-record (${1:record}, {${2:field}${3: = ${4:value}}}).",
+ name: "Record Directive",
+ scope: "source.erlang",
+ tabTrigger: "rec",
+ uuid: "43C66E91-F2C4-4E42-AF8E-21C1DB6401A2"},
+ {content:
+ "try${1: ${2:expression}${3: of\n\t${4:pattern}${5: when ${6:guard}} ->\n\t\t${7:body}}}\n${8:catch\n\t${9:pattern}${10: when ${11:guard}} ->\n\t\t${12:body}}\n${13:after\n\t${14:body}}\nend",
+ name: "Try Expression",
+ scope: "source.erlang",
+ tabTrigger: "try",
+ uuid: "5815443C-4D02-4B76-85FF-9B745386F2A1"},
+ {content: "-undef (${1:macro}).",
+ name: "Undef Directive",
+ scope: "source.erlang",
+ tabTrigger: "undef",
+ uuid: "13BB91B4-FF8A-49E1-8960-3EC352613482"}]