ruby-block-converter

Convert Ruby blocks between {} and do-end formats

dsandstrom

11,134

35

4.1.1

GitHub

Ruby Block Converter

An Atom Package - Atom.io : Github

Build Status

Convert Ruby blocks between single line and multi line formats. Or between curly brackets and do-end statements.

Screenshot Screenshot

Instructions

{ } => do-end

Place the cursor in between the brackets and hit the shortcut.

macOS Linux/Win
Normal ctrl-} alt-]
Without joining ctrl-alt-} alt-}
do-end => { }

Place the cursor in between the do-end and hit the shortcut.

macOS Linux/Win
Normal ctrl-{ alt-[
Without collapse ctrl-alt-{ alt-{

Features

How It Works

Commands

'ruby-block-converter:to-curly-brackets'
'ruby-block-converter:to-curly-brackets-without-collapse'
'ruby-block-converter:to-do-end'
'ruby-block-converter:to-do-end-without-join'

Notes

Thanks

Inspired by the Sublime Text Ruby Block Converter by irohiroki.