From 2c5f6415369b597249fbdc15d366716b05515fa9 Mon Sep 17 00:00:00 2001 From: Shougo Matsushita Date: Sun, 24 Mar 2013 17:30:27 +0900 Subject: [PATCH] - Added ruby snippets. --- autoload/neosnippet/snippets/ruby.snip | 55 ++++++++++++++++++++++++++ doc/neosnippet.txt | 1 + 2 files changed, 56 insertions(+) diff --git a/autoload/neosnippet/snippets/ruby.snip b/autoload/neosnippet/snippets/ruby.snip index 6630f04..d631e40 100644 --- a/autoload/neosnippet/snippets/ruby.snip +++ b/autoload/neosnippet/snippets/ruby.snip @@ -58,3 +58,58 @@ snippet urlencode require 'erb' puts ERB::Util.url_encode '${1}' +snippet encoding +alias enc + # coding: utf-8 + ${0} + +snippet each +options word + each { |${1:#:variable}| ${2} } + +snippet each_do +options word + each do |${1:#:variable}| + ${2} + end + +snippet each_byte +options word + each_byte { |${1:#:variable}| ${2} } + +snippet each_char +options word + each_char { |${1:#:variable}| ${2} } + +snippet each_index +options word + each_index { |${1:#:variable}| ${2} } + +snippet each_key +options word + each_key { |${1:#:variable}| ${2} } + +snippet each_line +options word + each_line { |${1:#:variable}| ${2} } + +snippet each_with_index +options word + each_with_index { |${1:#:variable}| ${2} } + +snippet map +options word + map { |${1:#:variable}| ${2} } + +snippet sort +options word + sort { |${1:#:variable}| ${2} } + +snippet sort_by +options word + sort_by { |${1:#:variable}| ${2} } + +snippet lamda +options word + lambda { |${1:#:args}| ${2} } + diff --git a/doc/neosnippet.txt b/doc/neosnippet.txt index 1d83c89..f080b95 100755 --- a/doc/neosnippet.txt +++ b/doc/neosnippet.txt @@ -752,6 +752,7 @@ CHANGELOG *neosnippet-changelog* 2013-03-24 - Improved documentation. +- Added ruby snippets. 2013-03-21 - Added sql snippet.