added specific keys to avoid using file names for snippet id
This commit is contained in:
parent
6a2f26c329
commit
b06983bd4f
|
@ -1,5 +1,6 @@
|
||||||
# -*- mode: snippet -*-
|
# -*- mode: snippet -*-
|
||||||
# name: any? { |...| ... }
|
# name: any? { |...| ... }
|
||||||
|
# key: any
|
||||||
# group : collections
|
# group : collections
|
||||||
# --
|
# --
|
||||||
any? { |${e}| $0 }
|
any? { |${e}| $0 }
|
|
@ -1,5 +1,6 @@
|
||||||
# -*- mode: snippet -*-
|
# -*- mode: snippet -*-
|
||||||
# name: case ... end
|
# name: case ... end
|
||||||
|
# key: case
|
||||||
# group : general
|
# group : general
|
||||||
# --
|
# --
|
||||||
case ${1:object}
|
case ${1:object}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
# -*- mode: snippet -*-
|
# -*- mode: snippet -*-
|
||||||
# name: class ... end
|
# name: class ... end
|
||||||
|
# key: cls
|
||||||
# group : definitions
|
# group : definitions
|
||||||
# --
|
# --
|
||||||
class ${1:`(let ((fn (capitalize (file-name-nondirectory
|
class ${1:`(let ((fn (capitalize (file-name-nondirectory
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# -*- mode: snippet -*-
|
# -*- mode: snippet -*-
|
||||||
# name: def ... end
|
# name: def ... end
|
||||||
# key: def
|
# key: def
|
||||||
|
# key: def
|
||||||
# --
|
# --
|
||||||
def ${1:method}${2:(${3:args})}
|
def ${1:method}${2:(${3:args})}
|
||||||
$0
|
$0
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
# -*- mode: snippet -*-
|
# -*- mode: snippet -*-
|
||||||
# name: each { |...| ... }
|
# name: each { |...| ... }
|
||||||
|
# key: ea
|
||||||
# group : collections
|
# group : collections
|
||||||
# --
|
# --
|
||||||
each { |${e}| $0 }
|
each { |${e}| $0 }
|
|
@ -1,5 +1,6 @@
|
||||||
# -*- mode: snippet -*-
|
# -*- mode: snippet -*-
|
||||||
# name: each_cons(...) { |...| ... }
|
# name: each_cons(...) { |...| ... }
|
||||||
|
# key: eac
|
||||||
# group : collections
|
# group : collections
|
||||||
# --
|
# --
|
||||||
each_cons(${1:2}) { |${group}| $0 }
|
each_cons(${1:2}) { |${group}| $0 }
|
|
@ -1,5 +1,6 @@
|
||||||
# -*- mode: snippet -*-
|
# -*- mode: snippet -*-
|
||||||
# name: each_index { |i| ... }
|
# name: each_index { |i| ... }
|
||||||
|
# key: eai
|
||||||
# group : collections
|
# group : collections
|
||||||
# --
|
# --
|
||||||
each_index { |${i}| $0 }
|
each_index { |${i}| $0 }
|
|
@ -1,5 +1,6 @@
|
||||||
# -*- mode: snippet -*-
|
# -*- mode: snippet -*-
|
||||||
# name: each_with_index { |e, i| ... }
|
# name: each_with_index { |e, i| ... }
|
||||||
|
# key: eawi
|
||||||
# group : collections
|
# group : collections
|
||||||
# --
|
# --
|
||||||
each_with_index { |${e}, ${i}| $0 }
|
each_with_index { |${e}, ${i}| $0 }
|
|
@ -1,5 +1,6 @@
|
||||||
# -*- mode: snippet -*-
|
# -*- mode: snippet -*-
|
||||||
# name: else ...
|
# name: else ...
|
||||||
|
# key: el
|
||||||
# group : control structure
|
# group : control structure
|
||||||
# --
|
# --
|
||||||
else`(indent-for-tab-command)`
|
else`(indent-for-tab-command)`
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
# -*- mode: snippet -*-
|
# -*- mode: snippet -*-
|
||||||
# name: elsif ...
|
# name: elsif ...
|
||||||
|
# key: esi
|
||||||
# group : control structure
|
# group : control structure
|
||||||
# --
|
# --
|
||||||
elsif`(indent-for-tab-command)` ${1:condition}
|
elsif`(indent-for-tab-command)` ${1:condition}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
# -*- mode: snippet -*-
|
# -*- mode: snippet -*-
|
||||||
# name: for ... in ...; ... end
|
# name: for ... in ...; ... end
|
||||||
|
# key: forin
|
||||||
# group : control structure
|
# group : control structure
|
||||||
# --
|
# --
|
||||||
for ${1:element} in ${2:collection}
|
for ${1:element} in ${2:collection}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
# -*- mode: snippet -*-
|
# -*- mode: snippet -*-
|
||||||
# name: if ... end
|
# name: if ... end
|
||||||
|
# key: if
|
||||||
# group : control structure
|
# group : control structure
|
||||||
# --
|
# --
|
||||||
if ${1:condition}
|
if ${1:condition}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
# -*- mode: snippet -*-
|
# -*- mode: snippet -*-
|
||||||
# name: if ... else ... end
|
# name: if ... else ... end
|
||||||
|
# key: ife
|
||||||
# group : control structure
|
# group : control structure
|
||||||
# --
|
# --
|
||||||
if ${1:condition}
|
if ${1:condition}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
# -*- mode: snippet -*-
|
# -*- mode: snippet -*-
|
||||||
# name: map { |...| ... }
|
# name: map { |...| ... }
|
||||||
|
# key: map
|
||||||
# group : collections
|
# group : collections
|
||||||
# --
|
# --
|
||||||
map { |${e}| $0 }
|
map { |${e}| $0 }
|
|
@ -1,5 +1,6 @@
|
||||||
# -*- mode: snippet -*-
|
# -*- mode: snippet -*-
|
||||||
# name: reduce(...) { |...| ... }
|
# name: reduce(...) { |...| ... }
|
||||||
|
# key: red
|
||||||
# group : collections
|
# group : collections
|
||||||
# --
|
# --
|
||||||
reduce(${1:0}) { |${2:accumulator}, ${3:element}| $0 }
|
reduce(${1:0}) { |${2:accumulator}, ${3:element}| $0 }
|
|
@ -1,5 +1,6 @@
|
||||||
# -*- mode: snippet -*-
|
# -*- mode: snippet -*-
|
||||||
# name: reject { |...| ... }
|
# name: reject { |...| ... }
|
||||||
|
# key: reject
|
||||||
# group : collections
|
# group : collections
|
||||||
# --
|
# --
|
||||||
reject { |${1:element}| $0 }
|
reject { |${1:element}| $0 }
|
|
@ -1,5 +1,6 @@
|
||||||
# -*- mode: snippet -*-
|
# -*- mode: snippet -*-
|
||||||
# name: require "..."
|
# name: require "..."
|
||||||
|
# key: require
|
||||||
# group : general
|
# group : general
|
||||||
# --
|
# --
|
||||||
require '$0'
|
require '$0'
|
|
@ -1,5 +1,6 @@
|
||||||
# -*- mode: snippet -*-
|
# -*- mode: snippet -*-
|
||||||
# name: select { |...| ... }
|
# name: select { |...| ... }
|
||||||
|
# key: select
|
||||||
# group : collections
|
# group : collections
|
||||||
# --
|
# --
|
||||||
select { |${1:element}| $0 }
|
select { |${1:element}| $0 }
|
|
@ -1,5 +1,6 @@
|
||||||
# -*- mode: snippet -*-
|
# -*- mode: snippet -*-
|
||||||
# name: upto(...) { |n| ... }
|
# name: upto(...) { |n| ... }
|
||||||
|
# key: upt
|
||||||
# group : control structure
|
# group : control structure
|
||||||
# --
|
# --
|
||||||
upto(${n}) { |${i}|
|
upto(${n}) { |${i}|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
# -*- mode: snippet -*-
|
# -*- mode: snippet -*-
|
||||||
# name: when ... end
|
# name: when ... end
|
||||||
|
# key: when
|
||||||
# group : control structure
|
# group : control structure
|
||||||
# --
|
# --
|
||||||
when ${condition}
|
when ${condition}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
# -*- mode: snippet -*-
|
# -*- mode: snippet -*-
|
||||||
# name: while ... end
|
# name: while ... end
|
||||||
|
# key: while
|
||||||
# group : control structure
|
# group : control structure
|
||||||
# --
|
# --
|
||||||
while ${condition}
|
while ${condition}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
# -*- mode: snippet -*-
|
# -*- mode: snippet -*-
|
||||||
# name: zip(...) { |...| ... }
|
# name: zip(...) { |...| ... }
|
||||||
|
# key: zip
|
||||||
# group : collections
|
# group : collections
|
||||||
# --
|
# --
|
||||||
zip(${enums}) { |${row}| $0 }
|
zip(${enums}) { |${row}| $0 }
|
Loading…
Reference in New Issue