61 lines
928 B
Plaintext
61 lines
928 B
Plaintext
snippet if
|
|
abbr if ... end
|
|
if ${1:condition}
|
|
${2}
|
|
end
|
|
|
|
snippet def
|
|
abbr def ... end
|
|
def ${1:method_name}
|
|
${2}
|
|
end
|
|
|
|
snippet defrescue
|
|
alias defr
|
|
abbr def ... rescue ... end
|
|
def ${1:method_name}
|
|
${2}
|
|
rescue ${3:StandardError} => ${4:error}
|
|
${5}
|
|
end
|
|
|
|
snippet do
|
|
abbr do ... end
|
|
do
|
|
${1}
|
|
end
|
|
|
|
snippet dovar
|
|
abbr do |var| ... end
|
|
do |${1:var}|
|
|
${2}
|
|
end
|
|
|
|
snippet block
|
|
abbr { ... }
|
|
{
|
|
${1}
|
|
}
|
|
|
|
snippet blockvar
|
|
abbr {|var| ... }
|
|
{|${1:var}|
|
|
${2}
|
|
}
|
|
|
|
snippet fileopen
|
|
abbr File.open(filename) do ... end
|
|
File.open(${1:filename}, '${2:w}') do |${3:io}|
|
|
${0}
|
|
end
|
|
|
|
snippet edn
|
|
abbr => end?
|
|
end
|
|
|
|
snippet urlencode
|
|
# coding: utf-8
|
|
require 'erb'
|
|
puts ERB::Util.url_encode '${1}'
|
|
|