neosnippet.vim/autoload/neosnippet/snippets/ruby.snip

51 lines
721 B
Plaintext
Raw Normal View History

2012-02-02 04:33:35 +00:00
snippet if
abbr if end
if ${1:condition}
${2}
end
snippet def
abbr def end
2012-09-23 05:55:13 +00:00
def ${1:method_name}
2012-02-02 04:33:35 +00:00
${2}
end
snippet do
abbr do end
do
${1}
end
snippet dovar
abbr do |var| end
do |${1:var}|
${2}
end
snippet block
2012-09-23 05:55:13 +00:00
abbr { }
2012-02-02 04:33:35 +00:00
{
${1}
}
snippet blockvar
2012-09-23 05:55:13 +00:00
abbr {|var| }
{|${1:var}|
2012-02-02 04:33:35 +00:00
${2}
}
2012-09-23 05:55:13 +00:00
snippet fileopen
abbr File.open(filename) do end
File.open(${1:filename}, '${2:w}') do |${3:io}|
${0}
end
2012-02-02 04:33:35 +00:00
snippet edn
abbr => end?
end
snippet urlencode
# coding: utf-8
require 'erb'
puts ERB::Util.url_encode '${1}'