The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Ruby block conversion macros for Vim

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Eigen Class

Posts: 358
Nickname: eigenclass
Registered: Oct, 2005

Eigenclass is a hardcore Ruby blog.
Ruby block conversion macros for Vim Posted: Nov 14, 2005 7:50 AM
Reply to this message Reply

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

Advertisement

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:

block-conversion2.gif
Read more...

Read: Ruby block conversion macros for Vim

Topic: High level languages: faster? Previous Topic   Next Topic Topic: Oh, the places you’ll go!

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use