Create a gist now

Instantly share code, notes, and snippets.

Enable Electric Ruby Mode in Emacs
;; Add this to ~/.emacs
;; Missing from ruby-mode.el, see
(defun ruby-insert-end ()
"Insert \"end\" at point and reindent current line."
(insert "end")
(ruby-indent-line t)
(add-hook 'ruby-mode-hook
(lambda ()
(require 'ruby-electric)
(ruby-electric-mode t)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment