added specific keys to avoid using file names for snippet id

This commit is contained in:
lispy-dobby 2019-10-08 20:33:36 +03:00
parent 6a2f26c329
commit b06983bd4f
22 changed files with 22 additions and 0 deletions

View File

@ -1,5 +1,6 @@
# -*- mode: snippet -*-
# name: any? { |...| ... }
# key: any
# group : collections
# --
any? { |${e}| $0 }

View File

@ -1,5 +1,6 @@
# -*- mode: snippet -*-
# name: case ... end
# key: case
# group : general
# --
case ${1:object}

View File

@ -1,5 +1,6 @@
# -*- mode: snippet -*-
# name: class ... end
# key: cls
# group : definitions
# --
class ${1:`(let ((fn (capitalize (file-name-nondirectory

View File

@ -1,6 +1,7 @@
# -*- mode: snippet -*-
# name: def ... end
# key: def
# key: def
# --
def ${1:method}${2:(${3:args})}
$0

View File

@ -1,5 +1,6 @@
# -*- mode: snippet -*-
# name: each { |...| ... }
# key: ea
# group : collections
# --
each { |${e}| $0 }

View File

@ -1,5 +1,6 @@
# -*- mode: snippet -*-
# name: each_cons(...) { |...| ... }
# key: eac
# group : collections
# --
each_cons(${1:2}) { |${group}| $0 }

View File

@ -1,5 +1,6 @@
# -*- mode: snippet -*-
# name: each_index { |i| ... }
# key: eai
# group : collections
# --
each_index { |${i}| $0 }

View File

@ -1,5 +1,6 @@
# -*- mode: snippet -*-
# name: each_with_index { |e, i| ... }
# key: eawi
# group : collections
# --
each_with_index { |${e}, ${i}| $0 }

View File

@ -1,5 +1,6 @@
# -*- mode: snippet -*-
# name: else ...
# key: el
# group : control structure
# --
else`(indent-for-tab-command)`

View File

@ -1,5 +1,6 @@
# -*- mode: snippet -*-
# name: elsif ...
# key: esi
# group : control structure
# --
elsif`(indent-for-tab-command)` ${1:condition}

View File

@ -1,5 +1,6 @@
# -*- mode: snippet -*-
# name: for ... in ...; ... end
# key: forin
# group : control structure
# --
for ${1:element} in ${2:collection}

View File

@ -1,5 +1,6 @@
# -*- mode: snippet -*-
# name: if ... end
# key: if
# group : control structure
# --
if ${1:condition}

View File

@ -1,5 +1,6 @@
# -*- mode: snippet -*-
# name: if ... else ... end
# key: ife
# group : control structure
# --
if ${1:condition}

View File

@ -1,5 +1,6 @@
# -*- mode: snippet -*-
# name: map { |...| ... }
# key: map
# group : collections
# --
map { |${e}| $0 }

View File

@ -1,5 +1,6 @@
# -*- mode: snippet -*-
# name: reduce(...) { |...| ... }
# key: red
# group : collections
# --
reduce(${1:0}) { |${2:accumulator}, ${3:element}| $0 }

View File

@ -1,5 +1,6 @@
# -*- mode: snippet -*-
# name: reject { |...| ... }
# key: reject
# group : collections
# --
reject { |${1:element}| $0 }

View File

@ -1,5 +1,6 @@
# -*- mode: snippet -*-
# name: require "..."
# key: require
# group : general
# --
require '$0'

View File

@ -1,5 +1,6 @@
# -*- mode: snippet -*-
# name: select { |...| ... }
# key: select
# group : collections
# --
select { |${1:element}| $0 }

View File

@ -1,5 +1,6 @@
# -*- mode: snippet -*-
# name: upto(...) { |n| ... }
# key: upt
# group : control structure
# --
upto(${n}) { |${i}|

View File

@ -1,5 +1,6 @@
# -*- mode: snippet -*-
# name: when ... end
# key: when
# group : control structure
# --
when ${condition}

View File

@ -1,5 +1,6 @@
# -*- mode: snippet -*-
# name: while ... end
# key: while
# group : control structure
# --
while ${condition}

View File

@ -1,5 +1,6 @@
# -*- mode: snippet -*-
# name: zip(...) { |...| ... }
# key: zip
# group : collections
# --
zip(${enums}) { |${row}| $0 }