Initial commit.

This commit is contained in:
yan
2011-11-17 15:45:33 -06:00
commit 882015bc6d
1819 changed files with 111625 additions and 0 deletions

2
vim/snippets/ruby/#!.snippet Executable file
View File

@@ -0,0 +1,2 @@
#!/usr/bin/env ruby${1: -wKU}
${2}

1
vim/snippets/ruby/#.snippet Executable file
View File

@@ -0,0 +1 @@
# =>

1
vim/snippets/ruby/Md.snippet Executable file
View File

@@ -0,0 +1 @@
File.open(${1:dump_path}, "wb") { |${2:file}| Marshal.dump(${3:obj}, ${4:$2}) }

1
vim/snippets/ruby/Ml.snippet Executable file
View File

@@ -0,0 +1 @@
File.open(${1:dump_path}, "rb") { |${2:file}| Marshal.load(${3:$2}) }

1
vim/snippets/ruby/Pn.snippet Executable file
View File

@@ -0,0 +1 @@
PStore.new(${1})

1
vim/snippets/ruby/Yd-.snippet Executable file
View File

@@ -0,0 +1 @@
File.open(${1:path_to_yml}, "w") { |${2:file}| YAML.dump(${3:obj}, ${4:$2}) }

1
vim/snippets/ruby/Yd.snippet Executable file
View File

@@ -0,0 +1 @@
File.open(${1:path_to_yml}, "w") { |${2:file}| YAML.dump(${3:obj}, ${4:$2}) }

1
vim/snippets/ruby/Yl-.snippet Executable file
View File

@@ -0,0 +1 @@
File.open(${1:path_to_yml}) { |${2:file}| YAML.load(${3:$2}) }

1
vim/snippets/ruby/Yl.snippet Executable file
View File

@@ -0,0 +1 @@
File.open(${1:path_to_yml}) { |${2:file}| YAML.load(${3:$2}) }

1
vim/snippets/ruby/am.snippet Executable file
View File

@@ -0,0 +1 @@
alias :${1:new_name} :${2:old_name}

View File

@@ -0,0 +1 @@
assert_nothing_raised(${1:Exception}) { ${2} }

1
vim/snippets/ruby/as.snippet Executable file
View File

@@ -0,0 +1 @@
assert ${1:test}, "${2:failure_message}"

1
vim/snippets/ruby/asam.snippet Executable file
View File

@@ -0,0 +1 @@
assert_alias_method ${1:object}, ${2:alias_name}, ${3:original_name}

1
vim/snippets/ruby/asb.snippet Executable file
View File

@@ -0,0 +1 @@
assert_boolean ${1:actual}

1
vim/snippets/ruby/asc.snippet Executable file
View File

@@ -0,0 +1 @@
assert_compare ${1:expected}, ${2:operator}, ${3:actual}

1
vim/snippets/ruby/ascd.snippet Executable file
View File

@@ -0,0 +1 @@
assert_const_defined ${1:object}, ${2:constant_name}

1
vim/snippets/ruby/ase.snippet Executable file
View File

@@ -0,0 +1 @@
assert_equal ${1:expected}, ${2:actual}

1
vim/snippets/ruby/asem.snippet Executable file
View File

@@ -0,0 +1 @@
assert_empty ${1:object}

1
vim/snippets/ruby/asf.snippet Executable file
View File

@@ -0,0 +1 @@
assert_false ${1:actual}

1
vim/snippets/ruby/asfa.snippet Executable file
View File

@@ -0,0 +1 @@
assert_fail_assertion { ${1:block} }

1
vim/snippets/ruby/asi.snippet Executable file
View File

@@ -0,0 +1 @@
assert_include ${1:collection}, ${2:object}

1
vim/snippets/ruby/asid.snippet Executable file
View File

@@ -0,0 +1 @@
assert_in_delta ${1:expected_float}, ${2:actual_float}, ${3:delta_float}

1
vim/snippets/ruby/asie.snippet Executable file
View File

@@ -0,0 +1 @@
assert_in_epsilon ${1:expected_float}, ${2:actual_float}

1
vim/snippets/ruby/asio.snippet Executable file
View File

@@ -0,0 +1 @@
assert_instance_of ${1:ExpectedClass}, ${2:actual_instance}

1
vim/snippets/ruby/asko.snippet Executable file
View File

@@ -0,0 +1 @@
assert_kind_of ${1:ExpectedKind}, ${2:actual_instance}

1
vim/snippets/ruby/asm.snippet Executable file
View File

@@ -0,0 +1 @@
assert_match /${1:expected_pattern}/, ${2:actual_string}

1
vim/snippets/ruby/asn.snippet Executable file
View File

@@ -0,0 +1 @@
assert_nil ${1:instance}

View File

@@ -0,0 +1 @@
assert_not_const_defined ${1:object}, ${2:constant_name}

1
vim/snippets/ruby/asne.snippet Executable file
View File

@@ -0,0 +1 @@
assert_not_equal ${1:unexpected}, ${2:actual}

View File

@@ -0,0 +1 @@
assert_not_empty ${1:object}

1
vim/snippets/ruby/asni.snippet Executable file
View File

@@ -0,0 +1 @@
assert_not_include ${1:collection}, ${2:object}

View File

@@ -0,0 +1 @@
assert_not_in_delta ${1:expected_float}, ${2:actual_float}

View File

@@ -0,0 +1 @@
assert_not_in_epsilon ${1:expected_float}, ${2:actual_float}

1
vim/snippets/ruby/asnm.snippet Executable file
View File

@@ -0,0 +1 @@
assert_no_match /${1:unexpected_pattern}/, ${2:actual_string}

1
vim/snippets/ruby/asnn.snippet Executable file
View File

@@ -0,0 +1 @@
assert_not_nil ${1:instance}

1
vim/snippets/ruby/asnp.snippet Executable file
View File

@@ -0,0 +1 @@
assert_not_predicate ${1:object}, ${2:predicate}

1
vim/snippets/ruby/asnr.snippet Executable file
View File

@@ -0,0 +1 @@
assert_nothing_raised { ${1:block} }

View File

@@ -0,0 +1 @@
assert_not_respond_to ${1:object}, ${2:method}

1
vim/snippets/ruby/asns.snippet Executable file
View File

@@ -0,0 +1 @@
assert_not_same ${1:unexpected}, ${2:actual}

View File

@@ -0,0 +1 @@
assert_not_send ${1:send_array}

1
vim/snippets/ruby/asnt.snippet Executable file
View File

@@ -0,0 +1 @@
assert_nothing_thrown { ${1} }

1
vim/snippets/ruby/aso.snippet Executable file
View File

@@ -0,0 +1 @@
assert_operator ${1:left}, :${2:operator}, ${3:right}

1
vim/snippets/ruby/asp.snippet Executable file
View File

@@ -0,0 +1 @@
assert_predicate ${1:object}, ${2:predicate}

1
vim/snippets/ruby/aspe.snippet Executable file
View File

@@ -0,0 +1 @@
assert_path_exist ${1:path}

View File

@@ -0,0 +1 @@
assert_path_not_exist ${1:path}

1
vim/snippets/ruby/asr.snippet Executable file
View File

@@ -0,0 +1 @@
assert_raise(${1:Exception}) { ${2} }

View File

@@ -0,0 +1 @@
assert_raise_kind_of(${1:kinds...}) { ${2:block} }

1
vim/snippets/ruby/asrm.snippet Executable file
View File

@@ -0,0 +1 @@
assert_raise_message ${1:expected_message}

1
vim/snippets/ruby/asrt.snippet Executable file
View File

@@ -0,0 +1 @@
assert_respond_to ${1:object}, :${2:method}

View File

@@ -0,0 +1 @@
assert_send [${1:object}, :${2:message}, ${3:args}]

1
vim/snippets/ruby/asse.snippet Executable file
View File

@@ -0,0 +1 @@
assert_send ${1:send_array}

1
vim/snippets/ruby/ast.snippet Executable file
View File

@@ -0,0 +1 @@
assert_throws(:${1:expected}) { ${2} }

1
vim/snippets/ruby/astr.snippet Executable file
View File

@@ -0,0 +1 @@
assert_true ${1:actual}

View File

@@ -0,0 +1,6 @@
begin
${1}
rescue ${2:Exception} => ${3:e"}
${4}
end
${5}

View File

@@ -0,0 +1,8 @@
begin
${1}
rescue ${2:Exception} => ${3:e"}
${4}
ensure
${5}
end
${6}

4
vim/snippets/ruby/bm.snippet Executable file
View File

@@ -0,0 +1,4 @@
TESTS = ${1:10_000}
Benchmark.bmbm do |results|
${2}
end

5
vim/snippets/ruby/case.snippet Executable file
View File

@@ -0,0 +1,5 @@
case ${1:object}
when ${2:condition}
else
${3}
end

View File

@@ -0,0 +1,3 @@
class ${1:`Snippet_RubyClassNameFromFilename()`}${2}
${3}
end

View File

@@ -0,0 +1,5 @@
class ${1:`Snippet_RubyClassNameFromFilename()`}
def initialize${2}
${3}
end
end

View File

@@ -0,0 +1,3 @@
class ${1:`Snippet_RubyClassNameFromFilename()`}${2}
${3}
end

View File

@@ -0,0 +1 @@
class ${1:ErrorClassName} < ${2:StandardError}; end${3}

1
vim/snippets/ruby/col.snippet Executable file
View File

@@ -0,0 +1 @@
collect { |${1:e}| ${2} }

View File

@@ -0,0 +1,4 @@
collect do |${1:e}|
${2}
end

1
vim/snippets/ruby/deec.snippet Executable file
View File

@@ -0,0 +1 @@
Marshal.load(Marshal.dump(${1:obj_to_copy}))

3
vim/snippets/ruby/def.snippet Executable file
View File

@@ -0,0 +1,3 @@
def ${1:method}
${2}
end

3
vim/snippets/ruby/defi.snippet Executable file
View File

@@ -0,0 +1,3 @@
def initialize${1}
${2}
end

View File

@@ -0,0 +1,3 @@
def method_missing(method, *args, &block)
${1}
end

3
vim/snippets/ruby/defs.snippet Executable file
View File

@@ -0,0 +1,3 @@
def self.${1:class_method_name}
${2}
end

3
vim/snippets/ruby/deft.snippet Executable file
View File

@@ -0,0 +1,3 @@
def test_${1:case_name}
${2}
end

View File

@@ -0,0 +1,3 @@
delete_if do |${1:elements}|
${2}
end

View File

@@ -0,0 +1,2 @@
delete_if { |${1:e}| ${2} }
${2}

1
vim/snippets/ruby/delt.snippit Executable file
View File

@@ -0,0 +1 @@
delegate :${1:method}, to: :${2:object}

View File

@@ -0,0 +1,3 @@
detect do |${1:element}|
${2}
end

View File

@@ -0,0 +1,2 @@
detect { |${1:e}| ${2} }
${3}

View File

@@ -0,0 +1 @@
detect { |${1:element}| ${2:body} }

View File

@@ -0,0 +1,3 @@
detect do |${1:element}|
${2:body}
end

View File

@@ -0,0 +1 @@
Dir.glob(${1:"<+dir+>"}) { |<+file+>| <++> }

3
vim/snippets/ruby/do.snippet Executable file
View File

@@ -0,0 +1,3 @@
do
${1}
end

3
vim/snippets/ruby/dop.snippet Executable file
View File

@@ -0,0 +1,3 @@
do |${1:param}|
${2}
end

1
vim/snippets/ruby/ea.snippet Executable file
View File

@@ -0,0 +1 @@
each { |${1:element}| ${2:body} }

View File

@@ -0,0 +1,3 @@
each do |${1:elements}|
${2}
end

View File

@@ -0,0 +1 @@
each { |${1:e}| ${2} }

View File

@@ -0,0 +1,4 @@
each_with_index do |${1:element}, ${2:i}|
${3}
end

View File

@@ -0,0 +1 @@
each_with_index { |${1:e}, ${2:i}| ${3} }

2
vim/snippets/ruby/eab.snippet Executable file
View File

@@ -0,0 +1,2 @@
each_byte { |${1:b}| ${2:body} }${3}

2
vim/snippets/ruby/eac.snippet Executable file
View File

@@ -0,0 +1,2 @@
each_char { |${1:c}| ${2:body} }${3}

3
vim/snippets/ruby/each.snippet Executable file
View File

@@ -0,0 +1,3 @@
each do |${1:element}|
${2:body}
end

View File

@@ -0,0 +1 @@
each_with_index { |${1:element},${2:i}| ${3:} }

View File

@@ -0,0 +1,4 @@
each_with_index do |${1:element},${2:i}|
${3:body}
end

View File

@@ -0,0 +1,3 @@
each do |${1:element}|
${2:body}
end

3
vim/snippets/ruby/eado.snippet Executable file
View File

@@ -0,0 +1,3 @@
each do |${1:element}|
${2:body}
end

2
vim/snippets/ruby/eai.snippet Executable file
View File

@@ -0,0 +1,2 @@
each_index { |${1:i}| ${2:body} }${3}

2
vim/snippets/ruby/eak.snippet Executable file
View File

@@ -0,0 +1,2 @@
each_key { |${1:k}| ${2:body} }${3}

2
vim/snippets/ruby/eap.snippet Executable file
View File

@@ -0,0 +1,2 @@
each_pair { |${1:k}, ${2:v}| ${3:body} }${4}

2
vim/snippets/ruby/eav.snippet Executable file
View File

@@ -0,0 +1,2 @@
each_value { |${1:v}| ${2:body} }${3}

1
vim/snippets/ruby/eawi.snippet Executable file
View File

@@ -0,0 +1 @@
each_with_index { |${1:element},${2:i}| ${3:} }

View File

@@ -0,0 +1,4 @@
each_with_index do |${1:element},${2:i}|
${3:body}
end

View File

@@ -0,0 +1,2 @@
elsif ${1:condition}
${2}

View File

@@ -0,0 +1 @@
File.foreach(${1:"<+path+>"}) { |<+line+>| <++> }

View File

@@ -0,0 +1,2 @@
File.open(${1:filename}, '${2:rwab}') { |${3:file}| ${4} }
${5}

Some files were not shown because too many files have changed in this diff Show More