git clone 'git://'

Melpa Status Melpa Stable Status


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.


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).


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