Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

32 lines (24 sloc) 1.001 kb
;; (require 'ruby-end)
;; (ruby-end-mode t)
(add-hook 'ruby-mode-hook 'arvid-ruby-mode-hook)
(let ((rb-files-re (regexp-opt '("Gemfile"))))
;; What is up with the back tick monstrosity :(
(add-to-list 'auto-mode-alist `(,rb-files-re . ruby-mode)))
(defun arvid-ruby-mode-hook ()
;; "C-c C-e" ends a block.
(define-key ruby-mode-map (kbd "C-c C-e")
(lambda () (interactive) (insert "end") (indent-for-tab-command)))
;; Add | to auto-pairs
;; ... Turns out this is not possible:
;;; (push '(?& . ?&)
;;; (getf autopair-extra-pairs :code))
;; Instead, the author of auto-pair suggest putting the character
;; one wants paired in the string-class of the syntax table. Let's
;; see how it works.
(modify-syntax-entry ?| "\""))
(provide 'arvid-ruby)
Jump to Line
Something went wrong with that request. Please try again.