mirror of
https://github.com/amix/vimrc
synced 2024-12-24 02:43:08 +00:00
82 lines
1.2 KiB
Text
82 lines
1.2 KiB
Text
snippet req require
|
|
require "${1}"
|
|
snippet case
|
|
case $1
|
|
when $2
|
|
${0}
|
|
end
|
|
snippet when
|
|
when $1
|
|
${0}
|
|
snippet def
|
|
def ${1:method_name}
|
|
${0}
|
|
end
|
|
snippet pdef
|
|
private def ${1:method_name}
|
|
${0}
|
|
end
|
|
snippet if
|
|
if $1
|
|
${0:${VISUAL}}
|
|
end
|
|
snippet ife
|
|
if $1
|
|
${2:${VISUAL}}
|
|
else
|
|
${0}
|
|
end
|
|
snippet wh
|
|
while $1
|
|
${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
|