jesenko
jesenko

Reputation: 1293

What are advantages of enh-ruby-mode vs ruby-mode

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

Answers (1)

Chris
Chris

Reputation: 137058

From its GitHub README:

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

Related Questions