From b06983bd4ff3a6089f82375a7077e2caaba82558 Mon Sep 17 00:00:00 2001 From: lispy-dobby Date: Tue, 8 Oct 2019 20:33:36 +0300 Subject: [PATCH] added specific keys to avoid using file names for snippet id --- snippets/crystal-mode/any | 1 + snippets/crystal-mode/case | 1 + snippets/crystal-mode/cls | 1 + snippets/crystal-mode/def | 1 + snippets/crystal-mode/ea | 1 + snippets/crystal-mode/eac | 1 + snippets/crystal-mode/eai | 1 + snippets/crystal-mode/eawi | 1 + snippets/crystal-mode/el | 1 + snippets/crystal-mode/esi | 1 + snippets/crystal-mode/forin | 1 + snippets/crystal-mode/if | 1 + snippets/crystal-mode/ife | 1 + snippets/crystal-mode/map | 1 + snippets/crystal-mode/red | 1 + snippets/crystal-mode/reject | 1 + snippets/crystal-mode/req | 1 + snippets/crystal-mode/select | 1 + snippets/crystal-mode/upt | 1 + snippets/crystal-mode/when | 1 + snippets/crystal-mode/while | 1 + snippets/crystal-mode/zip | 1 + 22 files changed, 22 insertions(+) diff --git a/snippets/crystal-mode/any b/snippets/crystal-mode/any index d41f68a..a58caf4 100644 --- a/snippets/crystal-mode/any +++ b/snippets/crystal-mode/any @@ -1,5 +1,6 @@ # -*- mode: snippet -*- # name: any? { |...| ... } +# key: any # group : collections # -- any? { |${e}| $0 } \ No newline at end of file diff --git a/snippets/crystal-mode/case b/snippets/crystal-mode/case index 706e2d5..e2f3308 100644 --- a/snippets/crystal-mode/case +++ b/snippets/crystal-mode/case @@ -1,5 +1,6 @@ # -*- mode: snippet -*- # name: case ... end +# key: case # group : general # -- case ${1:object} diff --git a/snippets/crystal-mode/cls b/snippets/crystal-mode/cls index 58ff20a..7b22720 100644 --- a/snippets/crystal-mode/cls +++ b/snippets/crystal-mode/cls @@ -1,5 +1,6 @@ # -*- mode: snippet -*- # name: class ... end +# key: cls # group : definitions # -- class ${1:`(let ((fn (capitalize (file-name-nondirectory diff --git a/snippets/crystal-mode/def b/snippets/crystal-mode/def index 875f0ff..ac12bbb 100644 --- a/snippets/crystal-mode/def +++ b/snippets/crystal-mode/def @@ -1,6 +1,7 @@ # -*- mode: snippet -*- # name: def ... end # key: def +# key: def # -- def ${1:method}${2:(${3:args})} $0 diff --git a/snippets/crystal-mode/ea b/snippets/crystal-mode/ea index 794d13b..9321c29 100644 --- a/snippets/crystal-mode/ea +++ b/snippets/crystal-mode/ea @@ -1,5 +1,6 @@ # -*- mode: snippet -*- # name: each { |...| ... } +# key: ea # group : collections # -- each { |${e}| $0 } \ No newline at end of file diff --git a/snippets/crystal-mode/eac b/snippets/crystal-mode/eac index e52f83e..9e9f838 100644 --- a/snippets/crystal-mode/eac +++ b/snippets/crystal-mode/eac @@ -1,5 +1,6 @@ # -*- mode: snippet -*- # name: each_cons(...) { |...| ... } +# key: eac # group : collections # -- each_cons(${1:2}) { |${group}| $0 } \ No newline at end of file diff --git a/snippets/crystal-mode/eai b/snippets/crystal-mode/eai index 9a9f8e9..9dde33f 100644 --- a/snippets/crystal-mode/eai +++ b/snippets/crystal-mode/eai @@ -1,5 +1,6 @@ # -*- mode: snippet -*- # name: each_index { |i| ... } +# key: eai # group : collections # -- each_index { |${i}| $0 } \ No newline at end of file diff --git a/snippets/crystal-mode/eawi b/snippets/crystal-mode/eawi index 068e1d4..9fcd7e7 100644 --- a/snippets/crystal-mode/eawi +++ b/snippets/crystal-mode/eawi @@ -1,5 +1,6 @@ # -*- mode: snippet -*- # name: each_with_index { |e, i| ... } +# key: eawi # group : collections # -- each_with_index { |${e}, ${i}| $0 } \ No newline at end of file diff --git a/snippets/crystal-mode/el b/snippets/crystal-mode/el index c953cdf..019ab7a 100644 --- a/snippets/crystal-mode/el +++ b/snippets/crystal-mode/el @@ -1,5 +1,6 @@ # -*- mode: snippet -*- # name: else ... +# key: el # group : control structure # -- else`(indent-for-tab-command)` diff --git a/snippets/crystal-mode/esi b/snippets/crystal-mode/esi index 2fd965f..ca82cdd 100644 --- a/snippets/crystal-mode/esi +++ b/snippets/crystal-mode/esi @@ -1,5 +1,6 @@ # -*- mode: snippet -*- # name: elsif ... +# key: esi # group : control structure # -- elsif`(indent-for-tab-command)` ${1:condition} diff --git a/snippets/crystal-mode/forin b/snippets/crystal-mode/forin index 15b94f8..18531bf 100644 --- a/snippets/crystal-mode/forin +++ b/snippets/crystal-mode/forin @@ -1,5 +1,6 @@ # -*- mode: snippet -*- # name: for ... in ...; ... end +# key: forin # group : control structure # -- for ${1:element} in ${2:collection} diff --git a/snippets/crystal-mode/if b/snippets/crystal-mode/if index 1b7310e..62a80a9 100644 --- a/snippets/crystal-mode/if +++ b/snippets/crystal-mode/if @@ -1,5 +1,6 @@ # -*- mode: snippet -*- # name: if ... end +# key: if # group : control structure # -- if ${1:condition} diff --git a/snippets/crystal-mode/ife b/snippets/crystal-mode/ife index 30448d0..ac7da89 100644 --- a/snippets/crystal-mode/ife +++ b/snippets/crystal-mode/ife @@ -1,5 +1,6 @@ # -*- mode: snippet -*- # name: if ... else ... end +# key: ife # group : control structure # -- if ${1:condition} diff --git a/snippets/crystal-mode/map b/snippets/crystal-mode/map index 2748092..1f71b19 100644 --- a/snippets/crystal-mode/map +++ b/snippets/crystal-mode/map @@ -1,5 +1,6 @@ # -*- mode: snippet -*- # name: map { |...| ... } +# key: map # group : collections # -- map { |${e}| $0 } \ No newline at end of file diff --git a/snippets/crystal-mode/red b/snippets/crystal-mode/red index 173eb7b..4f807b3 100644 --- a/snippets/crystal-mode/red +++ b/snippets/crystal-mode/red @@ -1,5 +1,6 @@ # -*- mode: snippet -*- # name: reduce(...) { |...| ... } +# key: red # group : collections # -- reduce(${1:0}) { |${2:accumulator}, ${3:element}| $0 } \ No newline at end of file diff --git a/snippets/crystal-mode/reject b/snippets/crystal-mode/reject index 75afef3..1a003aa 100644 --- a/snippets/crystal-mode/reject +++ b/snippets/crystal-mode/reject @@ -1,5 +1,6 @@ # -*- mode: snippet -*- # name: reject { |...| ... } +# key: reject # group : collections # -- reject { |${1:element}| $0 } \ No newline at end of file diff --git a/snippets/crystal-mode/req b/snippets/crystal-mode/req index 0eb5102..0be86a4 100644 --- a/snippets/crystal-mode/req +++ b/snippets/crystal-mode/req @@ -1,5 +1,6 @@ # -*- mode: snippet -*- # name: require "..." +# key: require # group : general # -- require '$0' \ No newline at end of file diff --git a/snippets/crystal-mode/select b/snippets/crystal-mode/select index f279c17..95da29b 100644 --- a/snippets/crystal-mode/select +++ b/snippets/crystal-mode/select @@ -1,5 +1,6 @@ # -*- mode: snippet -*- # name: select { |...| ... } +# key: select # group : collections # -- select { |${1:element}| $0 } \ No newline at end of file diff --git a/snippets/crystal-mode/upt b/snippets/crystal-mode/upt index 820b089..a5750f6 100644 --- a/snippets/crystal-mode/upt +++ b/snippets/crystal-mode/upt @@ -1,5 +1,6 @@ # -*- mode: snippet -*- # name: upto(...) { |n| ... } +# key: upt # group : control structure # -- upto(${n}) { |${i}| diff --git a/snippets/crystal-mode/when b/snippets/crystal-mode/when index 55d3433..5885d2c 100644 --- a/snippets/crystal-mode/when +++ b/snippets/crystal-mode/when @@ -1,5 +1,6 @@ # -*- mode: snippet -*- # name: when ... end +# key: when # group : control structure # -- when ${condition} diff --git a/snippets/crystal-mode/while b/snippets/crystal-mode/while index a1f1317..7b037f0 100644 --- a/snippets/crystal-mode/while +++ b/snippets/crystal-mode/while @@ -1,5 +1,6 @@ # -*- mode: snippet -*- # name: while ... end +# key: while # group : control structure # -- while ${condition} diff --git a/snippets/crystal-mode/zip b/snippets/crystal-mode/zip index a2f30c6..112c099 100644 --- a/snippets/crystal-mode/zip +++ b/snippets/crystal-mode/zip @@ -1,5 +1,6 @@ # -*- mode: snippet -*- # name: zip(...) { |...| ... } +# key: zip # group : collections # -- zip(${enums}) { |${row}| $0 } \ No newline at end of file