A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://github.com/zenspider/Enhanced-Ruby-Mode below:

zenspider/enhanced-ruby-mode: An enhanced ruby-mode for Emacs that uses Ripper in ruby 1.9+ to highlight and indent the source code

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 consequence only ruby 1.9.2 (or later) syntax is parsed correctly.

Syntax checking is also performed.

Existing ruby-mode hooks

You may have existing lines in your emacs config that add minor modes based on ruby mode, like this:

(add-hook 'ruby-mode-hook 'robe-mode)
(add-hook 'ruby-mode-hook 'yard-mode)

For these to work with enh-ruby-mode, you need to add hooks to the enh-ruby-mode minor mode:

(add-hook 'enh-ruby-mode-hook 'robe-mode)
(add-hook 'enh-ruby-mode-hook 'yard-mode)
Load enh-ruby-mode for Ruby files

To use enh-ruby-mode for .rb add the following to your init file:

(add-to-list 'auto-mode-alist '("\\.rb\\'" . enh-ruby-mode))

To use enh-ruby-mode for all common Ruby files and the following to your init file:

(add-to-list 'auto-mode-alist
             '("\\(?:\\.rb\\|ru\\|rake\\|thor\\|jbuilder\\|gemspec\\|podspec\\|/\\(?:Gem\\|Rake\\|Cap\\|Thor\\|Vagrant\\|Guard\\|Pod\\)file\\)\\'" . enh-ruby-mode))

Developing requires minitest 5.x gem.

Testing parser:

rake test:ruby [N=name or /pattern/]

rake test:elisp [N=pattern]

rake test:all

rake                            # same as test:all

Tests for Emacs Lisp require ERT. It is built-in since Emacs 24.1.

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

Improved UTF-8 support

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4