1
0
Fork 0
mirror of synced 2024-11-17 22:45:34 -05:00
ultimate-vim/sources_non_forked/vim-snippets/snippets/crystal.snippets

83 lines
1.3 KiB
Text
Raw Normal View History

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