sponsor Vim development Vim logo Vim Book Ad

blockle.vim : Toggle ruby block styles

 script karma  Rating 11/5, Downloaded by 474    Comments, bugs, improvements  Vim wiki

created by
Joshua Davey
 
script type
utility
 
description
This plugin allows rapid toggling between the two different styles of ruby
blocks, namely do/end and brackets {}. To use, simply move the cursor to the
beginning or end of a block, and type <Leader>b. As a mnemonic, remember 'b'
for 'block'.

Note: You must have your cursor on the do, end, {, or } for the plugin to work
correctly.

When moving from a do/end to a bracket-style block, the plugin with attempt to
move to a one-liner if appropriate:

For example, if have the following ruby code:

  ['one', 'two'].each do |number|
    puts number + "!"
  end

After invoking <Leader>b, the resulting code would be:

  ['one', 'two'].each { |number| puts number + "!" }

 
install details
Extract to ~/.vim, or ~\vimfiles (Windows)
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
blockle.tar.gz 0.5 2011-04-27 7.2 Joshua Davey Add ability to change default mapping
blockle.tar.gz 0.4 2011-01-22 7.2 Joshua Davey Bugfixes: save clipboard settings and content, preserve anonymous register
blockle.tar.gz 0.3 2010-12-21 7.2 Joshua Davey Better detection when inside of a block
blockle.tar.gz 0.2 2010-12-20 7.2 Joshua Davey Lots of bugfixes. Better support for nested inline blocks.
blockle.tar.gz 0.1 2010-12-18 7.2 Joshua Davey Initial upload
ip used for rating: 54.81.124.198

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
SourceForge.net Logo