-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathruby-config.el
More file actions
46 lines (36 loc) · 1.4 KB
/
ruby-config.el
File metadata and controls
46 lines (36 loc) · 1.4 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
;;; Ruby
;;; This file is part of the Emacs Dev Kit
;; Rake files are ruby, too, as are gemspecs, rackup files, and gemfiles.
(add-to-list 'auto-mode-alist '("\\.rake$" . ruby-mode))
(add-to-list 'auto-mode-alist '("Rakefile$" . ruby-mode))
(add-to-list 'auto-mode-alist '("\\.gemspec$" . ruby-mode))
(add-to-list 'auto-mode-alist '("\\.ru$" . ruby-mode))
(add-to-list 'auto-mode-alist '("Gemfile$" . ruby-mode))
(add-to-list 'auto-mode-alist '("Guardfile$" . ruby-mode))
;; We never want to edit Rubinius bytecode
(add-to-list 'completion-ignored-extensions ".rbc")
(autoload 'run-ruby "inf-ruby"
"Run an inferior Ruby process")
(autoload 'inf-ruby-keys "inf-ruby"
"Set local key defs for inf-ruby in ruby-mode")
;; yari provides a nice Emacs interface to ri
(require 'yari)
(require 'ruby-block)
(require 'ruby-end)
(add-hook 'ruby-mode-hook
'(lambda ()
(coding-hook)
(inf-ruby-keys)
;; turn off the annoying input echo in irb
(setq comint-process-echoes t)
(ruby-block-mode t)
(local-set-key (kbd "C-h r") 'yari)))
;; HAML and SASS are quite handy in Rails development
(require 'haml-mode)
(require 'scss-mode)
;; cucumber support
(require 'feature-mode)
(add-to-list 'auto-mode-alist '("\.feature$" . feature-mode))
;; load bundle snippets
(yas/load-directory (concat ext-dir "feature-mode/snippets"))
(provide 'ruby-config)