Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
In Emacs, toggle ruby hash syntax between classic and 1.9 styles
branch: master
Failed to load latest commit information.
.gitignore Initial commit
README.md Update MELPA URLs
ruby-hash-syntax.el Use catch/throw to tidy up code

README.md

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

Something went wrong with that request. Please try again.