- Improved ruby snippets.

This commit is contained in:
Shougo Matsushita 2012-10-28 18:49:19 +09:00
parent f1a6401519
commit a0cae1175e

View File

@ -1,11 +1,11 @@
snippet if
abbr if end
abbr if ... end
if ${1:condition}
${2}
end
snippet def
abbr def end
abbr def ... end
def ${1:method_name}
${2}
end
@ -26,25 +26,25 @@ abbr do ... end
end
snippet dovar
abbr do |var| end
abbr do |var| ... end
do |${1:var}|
${2}
end
snippet block
abbr { }
abbr { ... }
{
${1}
}
snippet blockvar
abbr {|var| }
abbr {|var| ... }
{|${1:var}|
${2}
}
snippet fileopen
abbr File.open(filename) do end
abbr File.open(filename) do ... end
File.open(${1:filename}, '${2:w}') do |${3:io}|
${0}
end
@ -57,3 +57,4 @@ snippet urlencode
# coding: utf-8
require 'erb'
puts ERB::Util.url_encode '${1}'