From 759ac67b41d9cb7185b40cd84773fce5caa5b3eb Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Mon, 4 Jul 2016 18:16:17 +0900 Subject: add postfix template for ruby --- template/ruby/pattern.stpl | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 template/ruby/pattern.stpl diff --git a/template/ruby/pattern.stpl b/template/ruby/pattern.stpl new file mode 100644 index 0000000..cc02af5 --- /dev/null +++ b/template/ruby/pattern.stpl @@ -0,0 +1,31 @@ +^\s*\zs\(\S.*\)\.each$ + {{$1}}.each do |x| + {{_cursor_}} + end + +^\s*\zs\(\S.*\)\.eachb$ + {{$1}}.each {|x| + {{_cursor_}} + } + +^\s*\zs\(\S.*\)\.eachi$ + {{$1}}.each_with_index do |x,i| + {{_cursor_}} + end + +^\s*\zs\(\S.*\)\.eachbi$ + {{$1}}.each_with_index {|x,i| + {{_cursor_}} + } + +^\s*\zs\(\S.*\)\.map$ + {{$1}}.map do |x| + {{_cursor_}} + end + +^\s*\zs\(\S.*\)\.mapb$ + {{$1}}.map {|x| + {{_cursor_}} + } + + -- cgit v1.2.3-54-g00ecf