diff --git a/snippets/elixir-mode/after b/snippets/elixir-mode/after new file mode 100644 index 0000000..1c6b18f --- /dev/null +++ b/snippets/elixir-mode/after @@ -0,0 +1,6 @@ +## -*- mode: snippet -*- +# name : after +# key: after +# -- +after ${1:500} -> + $0 \ No newline at end of file diff --git a/snippets/elixir-mode/call b/snippets/elixir-mode/call index 27779ab..63b4db2 100644 --- a/snippets/elixir-mode/call +++ b/snippets/elixir-mode/call @@ -2,4 +2,4 @@ # name: call # key: call # -- -GenServer.call(${1:__MODULE__}, $0) +GenServer.call(${1:__MODULE__}, $0) \ No newline at end of file diff --git a/snippets/elixir-mode/case b/snippets/elixir-mode/case index 1630d2e..05d20ce 100644 --- a/snippets/elixir-mode/case +++ b/snippets/elixir-mode/case @@ -4,4 +4,4 @@ # -- case $1 do $0 -end +end \ No newline at end of file diff --git a/snippets/elixir-mode/cast b/snippets/elixir-mode/cast index d06f3b7..3ef0680 100644 --- a/snippets/elixir-mode/cast +++ b/snippets/elixir-mode/cast @@ -2,4 +2,4 @@ # name: cast # key: cast # -- -GenServer.cast(${1:__MODULE__}, $0) +GenServer.cast(${1:__MODULE__}, $0) \ No newline at end of file diff --git a/snippets/elixir-mode/cond b/snippets/elixir-mode/cond index 40934ff..d8be9cc 100644 --- a/snippets/elixir-mode/cond +++ b/snippets/elixir-mode/cond @@ -4,4 +4,4 @@ # -- cond do $0 -end +end \ No newline at end of file diff --git a/snippets/elixir-mode/def b/snippets/elixir-mode/def index 171c165..9d45c94 100644 --- a/snippets/elixir-mode/def +++ b/snippets/elixir-mode/def @@ -4,4 +4,4 @@ # -- def ${1:function}${2:(${3:args})} do $0 -end +end \ No newline at end of file diff --git a/snippets/elixir-mode/defmacro b/snippets/elixir-mode/defmacro index 6412f6c..da00acb 100644 --- a/snippets/elixir-mode/defmacro +++ b/snippets/elixir-mode/defmacro @@ -4,4 +4,4 @@ # -- defmacro $1 do $0 -end +end \ No newline at end of file diff --git a/snippets/elixir-mode/defmacrop b/snippets/elixir-mode/defmacrop index d1bbde6..620ab32 100644 --- a/snippets/elixir-mode/defmacrop +++ b/snippets/elixir-mode/defmacrop @@ -4,4 +4,4 @@ # -- defmacrop $1 do $0 -end +end \ No newline at end of file diff --git a/snippets/elixir-mode/defmodule b/snippets/elixir-mode/defmodule index 83568ea..6e4e2d3 100644 --- a/snippets/elixir-mode/defmodule +++ b/snippets/elixir-mode/defmodule @@ -4,4 +4,4 @@ # -- defmodule $1 do $0 -end +end \ No newline at end of file diff --git a/snippets/elixir-mode/defmodule_filename b/snippets/elixir-mode/defmodule_filename new file mode 100644 index 0000000..899d96a --- /dev/null +++ b/snippets/elixir-mode/defmodule_filename @@ -0,0 +1,7 @@ +## -*- mode: snippet -*- +# name : defmodule XXX end +# key: dm +# -- +defmodule ${1:`(concat (capitalize (file-name-nondirectory (directory-file-name (file-name-directory buffer-file-name)))) ".")`}${2:`(mapconcat 'capitalize (split-string (file-name-base) "_") "")`} do + $0 +end \ No newline at end of file diff --git a/snippets/elixir-mode/defp b/snippets/elixir-mode/defp index d2236d2..61a682e 100644 --- a/snippets/elixir-mode/defp +++ b/snippets/elixir-mode/defp @@ -4,4 +4,4 @@ # -- defp $1 do $0 -end +end \ No newline at end of file diff --git a/snippets/elixir-mode/do b/snippets/elixir-mode/do index 807dc99..5447f52 100644 --- a/snippets/elixir-mode/do +++ b/snippets/elixir-mode/do @@ -4,4 +4,4 @@ # -- do $0 -end +end \ No newline at end of file diff --git a/snippets/elixir-mode/doc b/snippets/elixir-mode/doc index c23f906..92711c2 100644 --- a/snippets/elixir-mode/doc +++ b/snippets/elixir-mode/doc @@ -4,4 +4,4 @@ # -- @doc """ $0 -""" +""" \ No newline at end of file diff --git a/snippets/elixir-mode/for b/snippets/elixir-mode/for index 42b0c0f..2e395df 100644 --- a/snippets/elixir-mode/for +++ b/snippets/elixir-mode/for @@ -4,4 +4,4 @@ # -- for ${2:x} <- ${1:enum} do $2$0 -end +end \ No newline at end of file diff --git a/snippets/elixir-mode/function b/snippets/elixir-mode/function new file mode 100644 index 0000000..fa081bd --- /dev/null +++ b/snippets/elixir-mode/function @@ -0,0 +1,7 @@ +## -*- mode: snippet -*- +# name : function +# key: dfun +# -- +def $1($2)${3:$$(when (and yas-moving-away-p yas-modified-p) (concat " when " yas-text))} do + $0 +end \ No newline at end of file diff --git a/snippets/elixir-mode/function-one-line b/snippets/elixir-mode/function-one-line new file mode 100644 index 0000000..3eaf8e5 --- /dev/null +++ b/snippets/elixir-mode/function-one-line @@ -0,0 +1,5 @@ +## -*- mode: snippet -*- +# name : function-one-line +# key: df +# -- +def $1($2)${3:$$(when (and yas-moving-away-p yas-modified-p) (concat " when " yas-text))}, do: $0 \ No newline at end of file diff --git a/snippets/elixir-mode/hcall b/snippets/elixir-mode/hcall index d878b74..9d30b3b 100644 --- a/snippets/elixir-mode/hcall +++ b/snippets/elixir-mode/hcall @@ -5,4 +5,4 @@ def handle_call($1, _from, state) do reply = $0 {:reply, reply, state} -end +end \ No newline at end of file diff --git a/snippets/elixir-mode/hcast b/snippets/elixir-mode/hcast index a217806..021947a 100644 --- a/snippets/elixir-mode/hcast +++ b/snippets/elixir-mode/hcast @@ -5,4 +5,4 @@ def handle_cast($1, state) do $0 {:noreply, state} -end +end \ No newline at end of file diff --git a/snippets/elixir-mode/hinfo b/snippets/elixir-mode/hinfo index f4539ac..6e6ce8c 100644 --- a/snippets/elixir-mode/hinfo +++ b/snippets/elixir-mode/hinfo @@ -5,4 +5,4 @@ def handle_info($1, state) do $0 {:noreply, state} -end +end \ No newline at end of file diff --git a/snippets/elixir-mode/if b/snippets/elixir-mode/if index 664d903..6a588ce 100644 --- a/snippets/elixir-mode/if +++ b/snippets/elixir-mode/if @@ -4,4 +4,4 @@ # -- if ${1:condition} do $0 -end +end \ No newline at end of file diff --git a/snippets/elixir-mode/ife b/snippets/elixir-mode/ife index 9bc95a5..3772976 100644 --- a/snippets/elixir-mode/ife +++ b/snippets/elixir-mode/ife @@ -6,4 +6,4 @@ if ${1:condition} do $2 else $3 -end +end \ No newline at end of file diff --git a/snippets/elixir-mode/io b/snippets/elixir-mode/io index dd916b4..e6a7780 100644 --- a/snippets/elixir-mode/io +++ b/snippets/elixir-mode/io @@ -2,4 +2,4 @@ # name: io # key: io # -- -IO.puts("$1")$0 +IO.puts("$1")$0 \ No newline at end of file diff --git a/snippets/elixir-mode/iop b/snippets/elixir-mode/iop index a9ce985..603346b 100644 --- a/snippets/elixir-mode/iop +++ b/snippets/elixir-mode/iop @@ -2,4 +2,4 @@ # name: iop # key: iop # -- -IO.puts("$1 #{inspect $1}")$0 +IO.puts("$1 #{inspect $1}")$0 \ No newline at end of file diff --git a/snippets/elixir-mode/mdoc b/snippets/elixir-mode/mdoc index c0cc4f2..a5f8b46 100644 --- a/snippets/elixir-mode/mdoc +++ b/snippets/elixir-mode/mdoc @@ -4,4 +4,4 @@ # -- @moduledoc """ $0 -""" +""" \ No newline at end of file diff --git a/snippets/elixir-mode/pry b/snippets/elixir-mode/pry index 5704c72..24325f6 100644 --- a/snippets/elixir-mode/pry +++ b/snippets/elixir-mode/pry @@ -3,4 +3,4 @@ # key: pry # group: debug # -- -require IEx; IEx.pry +require IEx; IEx.pry \ No newline at end of file diff --git a/snippets/elixir-mode/receive b/snippets/elixir-mode/receive new file mode 100644 index 0000000..b564208 --- /dev/null +++ b/snippets/elixir-mode/receive @@ -0,0 +1,7 @@ +## -*- mode: snippet -*- +# name : receive +# key: rcv +# -- +receive do + $0 +end \ No newline at end of file diff --git a/snippets/elixir-mode/test b/snippets/elixir-mode/test index 9babbd4..491e76c 100644 --- a/snippets/elixir-mode/test +++ b/snippets/elixir-mode/test @@ -4,4 +4,4 @@ # -- test "$1" do $0 -end +end \ No newline at end of file diff --git a/snippets/elixir-mode/unless b/snippets/elixir-mode/unless index 3b1a165..675be0a 100644 --- a/snippets/elixir-mode/unless +++ b/snippets/elixir-mode/unless @@ -4,4 +4,4 @@ # -- unless ${1:condition} do $0 -end +end \ No newline at end of file