Created
March 4, 2014 19:02
-
-
Save danp/9353268 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(add-to-list 'load-path (concat user-emacs-directory "vendor/enhanced-ruby-mode")) | |
(setq enh-ruby-program "/opt/boxen/rbenv/versions/2.1.1/bin/ruby") | |
(autoload 'enh-ruby-mode "enh-ruby-mode" "Major mode for ruby files" t) | |
(add-to-list 'auto-mode-alist '("\\.rb$" . enh-ruby-mode)) | |
(add-to-list 'auto-mode-alist '("\\.rake$" . enh-ruby-mode)) | |
(add-to-list 'auto-mode-alist '("Rakefile$" . enh-ruby-mode)) | |
(add-to-list 'auto-mode-alist '("\\.gemspec$" . enh-ruby-mode)) | |
(add-to-list 'auto-mode-alist '("\\.ru$" . enh-ruby-mode)) | |
(add-to-list 'auto-mode-alist '("Gemfile$" . enh-ruby-mode)) | |
(add-to-list 'interpreter-mode-alist '("ruby" . enh-ruby-mode)) | |
(setq enh-ruby-bounce-deep-indent t) | |
(setq enh-ruby-hanging-brace-indent-level 2) | |
(defun set-newline-and-indent () | |
(define-key enh-ruby-mode-map (kbd "RET") 'reindent-then-newline-and-indent)) | |
(add-hook 'enh-ruby-mode-hook 'set-newline-and-indent) | |
(custom-set-faces | |
'(erm-syn-errline ((t (:background "red1" :foreground "White")))) | |
'(erm-syn-warnline ((t (:background "magenta" :foreground "White"))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment