1
0
Fork 0
mirror of synced 2024-11-25 10:15:35 -05:00
ultimate-vim/sources_non_forked/vim-snippets/snippets/crystal.snippets

83 lines
1.2 KiB
Text
Raw Normal View History

2017-02-11 08:01:38 -05:00
snippet req require
require "${1}"
snippet case
case $1
when $2
2017-02-11 08:01:38 -05:00
${0}
end
snippet when
when $1
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
if $1
2017-02-11 08:01:38 -05:00
${0:${VISUAL}}
end
snippet ife
if $1
2017-02-11 08:01:38 -05:00
${2:${VISUAL}}
else
${0}
end
snippet wh
while $1
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