ruby-hash-syntax

https://github.com/purcell/ruby-hash-syntax.git

git clone 'git://github.com/purcell/ruby-hash-syntax.git'
11

Melpa Status Melpa Stable Status

ruby-hash-syntax.el

Adapted from the method used by TextMate, this library provides a command ruby-toggle-hash-syntax which attempts to automatically convert the selected region of ruby code between 1.8 and 1.9 hash styles.

Installation

If you choose not to use one of the convenient packages in Melpa and Marmalade, you'll need to add the directory containing ruby-hash-syntax.el to your load-path, and then (require 'ruby-hash-syntax).

Usage

Add the following to your emacs init file:

(require 'ruby-hash-syntax)

Then select a block of ruby code containing a hash literal (perhaps using mark-sexp), and run the ruby-toggle-hash-syntax command:

M-x ruby-toggle-hash-syntax

You might like to bind that command to a key in ruby-mode-map.


Steve Purcell's blog // @sanityinc on Twitter