Skip to content
This repository

An enhanced ruby-mode for Emacs that uses Ripper in ruby 1.9.2 to highlight and indent the source code

branch: master

Bug fixes

* Indent correctly on line continuations
* 'until' is a block start keyword
latest commit cf569363d6
Geoff Jacobsen authored June 04, 2012
Octocat-spinner-32 ruby Bug fixes June 04, 2012
Octocat-spinner-32 test Bug fixes May 28, 2012
Octocat-spinner-32 .gitignore fixed indentation of trailing rescuse keyword May 25, 2011
Octocat-spinner-32 COPYING add readme September 18, 2010
Octocat-spinner-32 README.rdoc Refine syntax highlight positioning March 27, 2012
Octocat-spinner-32 TODO Bug fixes May 28, 2012
Octocat-spinner-32 ruby-mode.el Bug fixes June 04, 2012
README.rdoc

Enhanced Ruby Mode

Description

Enhanced Ruby Mode replaces the emacs ruby mode that comes with ruby.

It uses the Ripper class found in ruby 1.9.2 (and later) to parse and indent the source code. As a consquence only ruby 1.9.2 (or later) syntax is parsed correctly.

Syntax checking is also preformed.

TODO

  • Optimisation; currently parses and fontifies whole buffer for most modifications - it still appears to run fast enough on large files.

  • Suggestions?

Synopsis

(add-to-list 'load-path "(path-to)/Enhanced-Ruby-Mode") ; must be added after any path containing old ruby-mode
(setq enh-ruby-program "(path-to-ruby1.9.3)/bin/ruby") ; so that still works if ruby points to ruby1.8
(require 'ruby-mode)

Requirements

  • ruby 1.9.2 (or later)

Install

  • git clone git@github.com:jacott/Enhanced-Ruby-Mode.git

Development

Developing requires test-unit-full gem

Testing parser:

ruby -I. test/test_erm_buffer.rb

Sorry, no test suite for ruby-mode.el

Credits

Jell (Jean-Louis Giordano) github.com/Jell

Improved UTF-8 support
Something went wrong with that request. Please try again.