Reputation: 1293
Some prepackaged emacs distributions use enh-ruby-mode
instead of default ruby-mode
(e.g. spacemacs)
What are the advantages of enh-ruby-mode
compared to ruby-mode
in terms of features it provides?
Upvotes: 4
Views: 1722
Reputation: 137058
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 performed.
The built-in ruby-mode
, like most built-in modes, uses regular expressions to parse source files. enh-ruby-mode
uses Ruby's Ripper
class, giving it better semantics. Syntax checking also appears to be something that ruby-mode
doesn't provide.
Upvotes: 1