restructuring classic snippets dir to conform to new parenting specs

This commit is contained in:
capitaomorte
2009-12-25 14:05:23 +00:00
parent eebdf516b2
commit 4426d044f6
418 changed files with 16 additions and 0 deletions
+4
View File
@@ -0,0 +1,4 @@
#name : # =>
#group : general
# --
# =>
+1
View File
@@ -0,0 +1 @@
text-mode
+6
View File
@@ -0,0 +1,6 @@
#name : =begin rdoc ... =end
#group : general
# --
=begin rdoc
$0
=end
+8
View File
@@ -0,0 +1,8 @@
#name : include Comparable; def <=> ... end
#group : definitions
# --
include Comparable
def <=> other
$0
end
+4
View File
@@ -0,0 +1,4 @@
#name : all? { |...| ... }
#group : collections
# --
all? { |${e}| $0 }
+4
View File
@@ -0,0 +1,4 @@
#name : alias_method new, old
#group : definitions
# --
alias_method :${new_name}, :${old_name}
+4
View File
@@ -0,0 +1,4 @@
#name : any? { |...| ... }
#group : collections
# --
any? { |${e}| $0 }
+6
View File
@@ -0,0 +1,6 @@
#name : if __FILE__ == $PROGRAM_NAME ... end
#group : general
# --
if __FILE__ == $PROGRAM_NAME
$0
end
+6
View File
@@ -0,0 +1,6 @@
#name : Benchmark.bmbm(...) do ... end
#group : general
# --
Benchmark.bmbm(${1:10}) do |x|
$0
end
+7
View File
@@ -0,0 +1,7 @@
#name : case ... end
#group : general
# --
case ${1:object}
when ${2:condition}
$0
end
+6
View File
@@ -0,0 +1,6 @@
#name : class << self ... end
#group : definitions
# --
class << ${self}
$0
end
+4
View File
@@ -0,0 +1,4 @@
#name : classify { |...| ... }
#group : collections
# --
classify { |${e}| $0 }
+13
View File
@@ -0,0 +1,13 @@
#name : class ... end
#contributor : hitesh <hitesh.jasani@gmail.com>
#group : definitions
# --
class ${1:`(let ((fn (capitalize (file-name-nondirectory
(file-name-sans-extension
(or (buffer-file-name)
(buffer-name (current-buffer))))))))
(cond
((string-match "_" fn) (replace-match "" nil nil fn))
(t fn)))`}
$0
end
+4
View File
@@ -0,0 +1,4 @@
#name : collect { |...| ... }
#group : collections
# --
collect { |${e}| $0 }
+4
View File
@@ -0,0 +1,4 @@
#name : deep_copy(...)
#group : general
# --
Marshal.load(Marshal.dump($0))
+4
View File
@@ -0,0 +1,4 @@
#name : delete_if { |...| ... }
#group : collections
# --
delete_if { |${e} $0 }
+4
View File
@@ -0,0 +1,4 @@
#name : detect { |...| ... }
#group : collections
# --
detect { |${e}| $0 }
+6
View File
@@ -0,0 +1,6 @@
#name : downto(...) { |n| ... }
#group : control structure
# --
downto(${0}) { |${n}|
$0
}
+4
View File
@@ -0,0 +1,4 @@
#name : each { |...| ... }
#group : collections
# --
each { |${e}| $0 }
+4
View File
@@ -0,0 +1,4 @@
#name : each_cons(...) { |...| ... }
#group : collections
# --
each_cons(${1:2}) { |${group}| $0 }
+4
View File
@@ -0,0 +1,4 @@
#name : each_index { |i| ... }
#group : collections
# --
each_index { |${i}| $0 }
+4
View File
@@ -0,0 +1,4 @@
#name : each_value { |val| ... }
#group : collections
# --
each_value { |${val}| $0 }
+4
View File
@@ -0,0 +1,4 @@
#name : each_with_index { |e, i| ... }
#group : collections
# --
each_with_index { |${e}, ${i}| $0 }
+6
View File
@@ -0,0 +1,6 @@
#name : for ... in ...; ... end
#group : control structure
# --
for ${1:element} in ${2:collection}
$0
end
+6
View File
@@ -0,0 +1,6 @@
#name : if ... end
#group : control structure
# --
if ${1:condition}
$0
end
+8
View File
@@ -0,0 +1,8 @@
#name : if ... else ... end
#group : control structure
# --
if ${1:condition}
$2
else
$3
end
+4
View File
@@ -0,0 +1,4 @@
#name : inject(...) { |...| ... }
#group : collections
# --
inject(${1:0}) { |${2:injection}, ${3:element}| $0 }
+6
View File
@@ -0,0 +1,6 @@
#name : def method_missing ... end
#group : definitions
# --
def method_missing(method, *args)
$0
end
+4
View File
@@ -0,0 +1,4 @@
#name : attr_reader ...
#group : definitions
# --
attr_reader :
+4
View File
@@ -0,0 +1,4 @@
#name : /usr/bin/ruby -wKU
#group : general
# --
#!/usr/bin/ruby -wKU
+4
View File
@@ -0,0 +1,4 @@
#name : reject { |...| ... }
#group : collections
# --
reject { |${1:element}| $0 }
+4
View File
@@ -0,0 +1,4 @@
#name : require "..."
#group : general
# --
require "$0"
+4
View File
@@ -0,0 +1,4 @@
#name : require File.join(File.dirname(__FILE__), ...)
#group : general
# --
require File.join(File.dirname(__FILE__), $0)
+4
View File
@@ -0,0 +1,4 @@
#name : attr_accessor ...
#group : definitions
# --
attr_accessor :
+4
View File
@@ -0,0 +1,4 @@
#name : select { |...| ... }
#group : collections
# --
select { |${1:element}| $0 }
+4
View File
@@ -0,0 +1,4 @@
#name : times { |n| ... }
#group : control structure
# --
times { |${n}| $0 }
+6
View File
@@ -0,0 +1,6 @@
#name : until ... end
#group: control structure
# --
until ${condition}
$0
end
+6
View File
@@ -0,0 +1,6 @@
#name : upto(...) { |n| ... }
#group : control structure
# --
upto(${n}) { |${i}|
$0
}
+4
View File
@@ -0,0 +1,4 @@
#name : attr_writer ...
#group : definitions
# --
attr_writer :
+6
View File
@@ -0,0 +1,6 @@
#name : when ... end
#group : control structure
# --
when ${condition}
$0
end
+6
View File
@@ -0,0 +1,6 @@
#name : while ... end
#group : control structure
# --
while ${condition}
$0
end
+4
View File
@@ -0,0 +1,4 @@
#name : :yields: arguments (rdoc)
#group : general
# --
:yields: $0
+4
View File
@@ -0,0 +1,4 @@
#name : zip(...) { |...| ... }
#group : collections
# --
zip(${enums}) { |${row}| $0 }