|
This post originated from an RSS feed registered with Ruby Buzz
by Eigen Class.
|
Original Post: Ruby block conversion macros for Vim
Feed Title: Eigenclass
Feed URL: http://feeds.feedburner.com/eigenclass
Feed Description: Ruby stuff --- trying to stay away from triviality.
|
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Eigen Class
Latest Posts From Eigenclass
|
|
Yet another simple macro for Vim I've become quite fond of. Have you ever written a single-line block like
myobj.each{|x| do whatever with x }
only to realize later that you actually wanted to do quite a bit more and you
need to turn that into the following?
myobj.each do |x|
do stuff
and some more
end
Or maybe you're refactoring some code and see that a multi-line block can
be collapsed into a single line using method chaining?
This is what I wanted:
Read more...
Read: Ruby block conversion macros for Vim