-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathruby-mode.el
33 lines (28 loc) · 1.19 KB
/
ruby-mode.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
;; ruby-mode
(require 'ruby-mode)
(add-to-list 'auto-mode-alist '("\\.rjs$" . ruby-mode))
(add-to-list 'auto-mode-alist '("\\.rake$" . ruby-mode))
(add-to-list 'auto-mode-alist '("Rakefile" . ruby-mode))
(add-to-list 'auto-mode-alist '("Capfile" . ruby-mode))
(add-to-list 'auto-mode-alist '("Gemfile" . ruby-mode))
(add-to-list 'auto-mode-alist '("\\.gemspec$" . ruby-mode))
(add-to-list 'auto-mode-alist '("Vagrantfile" . ruby-mode))
(add-to-list 'auto-mode-alist '(".irbrc" . ruby-mode))
(add-to-list 'auto-mode-alist '("\\.builder$" . ruby-mode))
(add-to-list 'auto-mode-alist '("\\.rabl$" . ruby-mode))
(add-to-list 'auto-mode-alist '("config.ru" . ruby-mode))
(setq ruby-deep-indent-paren nil)
;; ruby-mode-hook
(add-hook 'ruby-mode-hook
(lambda ()
;; (local-set-key (kbd "<return>") 'my-newline-and-indent)
;; (flyspell-prog-mode)
(highlight-indentation-current-column-mode)
))
(add-hook 'ruby-mode-hook 'subword-mode)
(require 'ruby-tools)
(define-key ruby-tools-mode-map (kbd "C-;") 'undefined)
(add-hook 'ruby-mode-hook 'ruby-tools-mode)
(defvar ruby--paren-closings-regex
"[])}\"']"
"regex matching closing paren or string delimiter.")