summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDineshkumar <rahuldinesh1991@gmail.com>2016-11-23 15:56:26 +0530
committerAndrea Crotti <andrea.crotti.0@gmail.com>2016-11-23 10:26:26 +0000
commit12b385f3badb51bd3689a1a0986cc9410ea416c5 (patch)
tree9090ba45c007f9523a4ead40453b35a1d685f720
parentf65ca42fad12370cd3da3d3dc404783d6bccf01c (diff)
Additional Elixir snippets (#166)
* Additional Elixir snippets * Delete arrow snippet * for snippet - spaces correction * if snippet - spaces correction * if else - spaces correction * Remove pipe snippet * test sippet - fix indentation * unless - fix indentation
-rw-r--r--elixir-mode/fn5
-rw-r--r--elixir-mode/for7
-rw-r--r--elixir-mode/if7
-rw-r--r--elixir-mode/ife9
-rw-r--r--elixir-mode/test7
-rw-r--r--elixir-mode/unless7
6 files changed, 42 insertions, 0 deletions
diff --git a/elixir-mode/fn b/elixir-mode/fn
new file mode 100644
index 0000000..0bdf073
--- /dev/null
+++ b/elixir-mode/fn
@@ -0,0 +1,5 @@
+# -*- mode: snippet -*-
+# name: fn
+# key: fn
+# --
+fn ${1:x} -> $1$0 end \ No newline at end of file
diff --git a/elixir-mode/for b/elixir-mode/for
new file mode 100644
index 0000000..42b0c0f
--- /dev/null
+++ b/elixir-mode/for
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: for
+# key: for
+# --
+for ${2:x} <- ${1:enum} do
+ $2$0
+end
diff --git a/elixir-mode/if b/elixir-mode/if
new file mode 100644
index 0000000..664d903
--- /dev/null
+++ b/elixir-mode/if
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: if
+# key: if
+# --
+if ${1:condition} do
+ $0
+end
diff --git a/elixir-mode/ife b/elixir-mode/ife
new file mode 100644
index 0000000..9bc95a5
--- /dev/null
+++ b/elixir-mode/ife
@@ -0,0 +1,9 @@
+# -*- mode: snippet -*-
+# name: if-else
+# key: ife
+# --
+if ${1:condition} do
+ $2
+else
+ $3
+end
diff --git a/elixir-mode/test b/elixir-mode/test
new file mode 100644
index 0000000..9babbd4
--- /dev/null
+++ b/elixir-mode/test
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: test
+# key: test
+# --
+test "$1" do
+ $0
+end
diff --git a/elixir-mode/unless b/elixir-mode/unless
new file mode 100644
index 0000000..3b1a165
--- /dev/null
+++ b/elixir-mode/unless
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: unless
+# key: unless
+# --
+unless ${1:condition} do
+ $0
+end