2017-02-11 08:01:38 -05:00
|
|
|
snippet req require
|
|
|
|
require "${1}"
|
|
|
|
snippet case
|
2022-09-25 06:10:28 -04:00
|
|
|
case ${1:object}
|
|
|
|
when ${2:condition}
|
2017-02-11 08:01:38 -05:00
|
|
|
${0}
|
|
|
|
end
|
|
|
|
snippet when
|
2022-09-25 06:10:28 -04:00
|
|
|
when ${1:condition}
|
2017-02-11 08:01:38 -05:00
|
|
|
${0}
|
|
|
|
snippet def
|
|
|
|
def ${1:method_name}
|
|
|
|
${0}
|
|
|
|
end
|
|
|
|
snippet pdef
|
|
|
|
private def ${1:method_name}
|
|
|
|
${0}
|
|
|
|
end
|
|
|
|
snippet if
|
2022-09-25 06:10:28 -04:00
|
|
|
if ${1:condition}
|
2017-02-11 08:01:38 -05:00
|
|
|
${0:${VISUAL}}
|
|
|
|
end
|
|
|
|
snippet ife
|
2022-09-25 06:10:28 -04:00
|
|
|
if ${1:condition}
|
2017-02-11 08:01:38 -05:00
|
|
|
${2:${VISUAL}}
|
|
|
|
else
|
|
|
|
${0}
|
|
|
|
end
|
|
|
|
snippet wh
|
2022-09-25 06:10:28 -04:00
|
|
|
while ${1:condition}
|
2017-02-11 08:01:38 -05:00
|
|
|
${0:${VISUAL}}
|
|
|
|
end
|
|
|
|
snippet cla class .. end
|
|
|
|
class ${1:`substitute(vim_snippets#Filename(), "\(_\|^\)\(.\)", "\u\2", "g")`}
|
|
|
|
${0}
|
|
|
|
end
|
|
|
|
snippet mod class .. end
|
|
|
|
module ${1:`substitute(vim_snippets#Filename(), "\(_\|^\)\(.\)", "\u\2", "g")`}
|
|
|
|
${0}
|
|
|
|
end
|
|
|
|
snippet r
|
|
|
|
getter ${0:name}
|
|
|
|
snippet r!
|
|
|
|
getter! ${0:name}
|
|
|
|
snippet r?
|
|
|
|
getter? ${0:name}
|
|
|
|
snippet w
|
|
|
|
setter ${0:name}
|
|
|
|
snippet w!
|
|
|
|
setter! ${0:name}
|
|
|
|
snippet w?
|
|
|
|
setter? ${0:name}
|
|
|
|
snippet rw
|
|
|
|
property ${0:name}
|
|
|
|
snippet rw!
|
|
|
|
property! ${0:name}
|
|
|
|
snippet rw?
|
|
|
|
property? ${0:name}
|
|
|
|
snippet defs
|
|
|
|
def self.${1:class_method_name}
|
|
|
|
${0}
|
|
|
|
end
|
|
|
|
snippet defi
|
|
|
|
def initialize(${1})
|
|
|
|
${0}
|
|
|
|
end
|
|
|
|
snippet do
|
|
|
|
do
|
|
|
|
${0:${VISUAL}}
|
|
|
|
end
|
|
|
|
snippet dov
|
|
|
|
do |${1:v}|
|
|
|
|
${2}
|
|
|
|
end
|
|
|
|
snippet desc
|
|
|
|
describe ${1:`substitute(substitute(vim_snippets#Filename(), "_spec$", "", ""), "\(_\|^\)\(.\)", "\u\2", "g")`} do
|
|
|
|
${0}
|
|
|
|
end
|
|
|
|
snippet it
|
|
|
|
it "${1}" do
|
|
|
|
${0}
|
|
|
|
end
|