mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-12-16 10:24:18 +00:00
removed group-name prefix on trigger keys
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#name : all? { |...| ... }
|
||||
# key: collectionsall
|
||||
# key: all
|
||||
# --
|
||||
all? { |${e}| $0 }
|
||||
@@ -1,4 +1,4 @@
|
||||
#name : any? { |...| ... }
|
||||
# key: collectionsany
|
||||
# key: any
|
||||
# --
|
||||
any? { |${e}| $0 }
|
||||
@@ -1,4 +1,4 @@
|
||||
#name : classify { |...| ... }
|
||||
# key: collectionsclassify
|
||||
# key: classify
|
||||
# --
|
||||
classify { |${e}| $0 }
|
||||
@@ -1,4 +1,4 @@
|
||||
#name : collect { |...| ... }
|
||||
# key: collectionscollect
|
||||
# key: collect
|
||||
# --
|
||||
collect { |${e}| $0 }
|
||||
@@ -1,4 +1,4 @@
|
||||
#name : delete_if { |...| ... }
|
||||
# key: collectionsdeli
|
||||
# key: deli
|
||||
# --
|
||||
delete_if { |${e} $0 }
|
||||
@@ -1,4 +1,4 @@
|
||||
#name : detect { |...| ... }
|
||||
# key: collectionsdet
|
||||
# key: det
|
||||
# --
|
||||
detect { |${e}| $0 }
|
||||
@@ -1,4 +1,4 @@
|
||||
#name : each { |...| ... }
|
||||
# key: collectionsea
|
||||
# key: ea
|
||||
# --
|
||||
each { |${e}| $0 }
|
||||
@@ -1,4 +1,4 @@
|
||||
#name : each_cons(...) { |...| ... }
|
||||
# key: collectionseac
|
||||
# key: eac
|
||||
# --
|
||||
each_cons(${1:2}) { |${group}| $0 }
|
||||
@@ -1,4 +1,4 @@
|
||||
#name : each_index { |i| ... }
|
||||
# key: collectionseai
|
||||
# key: eai
|
||||
# --
|
||||
each_index { |${i}| $0 }
|
||||
@@ -1,4 +1,4 @@
|
||||
#name : each_value { |val| ... }
|
||||
# key: collectionseav
|
||||
# key: eav
|
||||
# --
|
||||
each_value { |${val}| $0 }
|
||||
@@ -1,4 +1,4 @@
|
||||
#name : each_with_index { |e, i| ... }
|
||||
# key: collectionseawi
|
||||
# key: eawi
|
||||
# --
|
||||
each_with_index { |${e}, ${i}| $0 }
|
||||
@@ -1,4 +1,4 @@
|
||||
#name : inject(...) { |...| ... }
|
||||
# key: collectionsinject
|
||||
# key: inject
|
||||
# --
|
||||
inject(${1:0}) { |${2:injection}, ${3:element}| $0 }
|
||||
@@ -1,4 +1,4 @@
|
||||
#name : reject { |...| ... }
|
||||
# key: collectionsreject
|
||||
# key: reject
|
||||
# --
|
||||
reject { |${1:element}| $0 }
|
||||
@@ -1,4 +1,4 @@
|
||||
#name : select { |...| ... }
|
||||
# key: collectionsselect
|
||||
# key: select
|
||||
# --
|
||||
select { |${1:element}| $0 }
|
||||
@@ -1,5 +1,5 @@
|
||||
#name : include Comparable; def <=> ... end
|
||||
# key: definitionsComp
|
||||
# key: Comp
|
||||
# --
|
||||
include Comparable
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#name : alias_method new, old
|
||||
# key: definitionsam
|
||||
# key: am
|
||||
# --
|
||||
alias_method :${new_name}, :${old_name}
|
||||
@@ -1,5 +1,5 @@
|
||||
#name : class << self ... end
|
||||
# key: definitionscla
|
||||
# key: cla
|
||||
# --
|
||||
class << ${self}
|
||||
$0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#name : class ... end
|
||||
#contributor : hitesh <hitesh.jasani@gmail.com>
|
||||
# key: definitionscls
|
||||
# key: cls
|
||||
# --
|
||||
class ${1:`(let ((fn (capitalize (file-name-nondirectory
|
||||
(file-name-sans-extension
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#name : def method_missing ... end
|
||||
# key: definitionsmm
|
||||
# key: mm
|
||||
# --
|
||||
def method_missing(method, *args)
|
||||
$0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#name : attr_reader ...
|
||||
# key: definitionsr
|
||||
# key: r
|
||||
# --
|
||||
attr_reader :
|
||||
@@ -1,4 +1,4 @@
|
||||
#name : attr_accessor ...
|
||||
# key: definitionsrw
|
||||
# key: rw
|
||||
# --
|
||||
attr_accessor :
|
||||
@@ -1,4 +1,4 @@
|
||||
#name : attr_writer ...
|
||||
# key: definitionsw
|
||||
# key: w
|
||||
# --
|
||||
attr_writer :
|
||||
@@ -1,4 +1,4 @@
|
||||
#name : # =>
|
||||
# key: general#
|
||||
# key: #
|
||||
# --
|
||||
# =>
|
||||
@@ -1,5 +1,5 @@
|
||||
#name : =begin rdoc ... =end
|
||||
# key: general=b
|
||||
# key: =b
|
||||
# --
|
||||
=begin rdoc
|
||||
$0
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#name : if __FILE__ == $PROGRAM_NAME ... end
|
||||
# key: generalapp
|
||||
# key: app
|
||||
# --
|
||||
if __FILE__ == $PROGRAM_NAME
|
||||
$0
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#name : Benchmark.bmbm(...) do ... end
|
||||
# key: generalbm
|
||||
# key: bm
|
||||
# --
|
||||
Benchmark.bmbm(${1:10}) do |x|
|
||||
$0
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#name : case ... end
|
||||
# key: generalcase
|
||||
# key: case
|
||||
# --
|
||||
case ${1:object}
|
||||
when ${2:condition}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#name : deep_copy(...)
|
||||
# key: generaldee
|
||||
# key: dee
|
||||
# --
|
||||
Marshal.load(Marshal.dump($0))
|
||||
@@ -1,4 +1,4 @@
|
||||
#name : /usr/bin/ruby -wKU
|
||||
# key: generalrb
|
||||
# key: rb
|
||||
# --
|
||||
#!/usr/bin/ruby -wKU
|
||||
@@ -1,4 +1,4 @@
|
||||
#name : require "..."
|
||||
# key: generalreq
|
||||
# key: req
|
||||
# --
|
||||
require "$0"
|
||||
@@ -1,4 +1,4 @@
|
||||
#name : require File.join(File.dirname(__FILE__), ...)
|
||||
# key: generalrreq
|
||||
# key: rreq
|
||||
# --
|
||||
require File.join(File.dirname(__FILE__), $0)
|
||||
@@ -1,4 +1,4 @@
|
||||
#name : :yields: arguments (rdoc)
|
||||
# key: generaly
|
||||
# key: y
|
||||
# --
|
||||
:yields: $0
|
||||
Reference in New Issue
Block a user