* ruby and emacs
@ 2008-09-22 21:07 aidy lewis
2008-09-22 22:40 ` Lennart Borgman (gmail)
0 siblings, 1 reply; 3+ messages in thread
From: aidy lewis @ 2008-09-22 21:07 UTC (permalink / raw)
To: help-gnu-emacs
Hi,
Does anyone know how I set up Ruby syntax highlighting with emacs?
Aidy
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ruby and emacs
2008-09-22 21:07 ruby and emacs aidy lewis
@ 2008-09-22 22:40 ` Lennart Borgman (gmail)
0 siblings, 0 replies; 3+ messages in thread
From: Lennart Borgman (gmail) @ 2008-09-22 22:40 UTC (permalink / raw)
To: aidy lewis; +Cc: help-gnu-emacs
aidy lewis wrote:
> Hi,
>
> Does anyone know how I set up Ruby syntax highlighting with emacs?
>
> Aidy
http://www.emacswiki.org/cgi-bin/wiki/RubyMode
http://www.emacswiki.org/cgi-bin/wiki/RubyOnRails
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ruby and emacs
[not found] <mailman.19721.1222122917.18990.help-gnu-emacs@gnu.org>
@ 2008-09-22 22:47 ` Joost Diepenmaat
0 siblings, 0 replies; 3+ messages in thread
From: Joost Diepenmaat @ 2008-09-22 22:47 UTC (permalink / raw)
To: help-gnu-emacs
"aidy lewis" <aidy.lewis@googlemail.com> writes:
> Hi,
>
> Does anyone know how I set up Ruby syntax highlighting with emacs?
The base ruby install includes ruby-mode. You should probably get that
file plus its support files and put it in your load-path.
The following is some stuff that I've got in my .emacs file. You can
probably get away with just putting the add-to-list and autoload stuff
there.
See also http://www.emacswiki.org/cgi-bin/wiki/RubyMode
(autoload 'ruby-mode "ruby-mode"
"Mode for editing ruby source files")
(add-to-list 'auto-mode-alist '("\\.rb$" . ruby-mode))
(add-to-list 'auto-mode-alist '("Rakefile$" . ruby-mode))
(add-to-list 'auto-mode-alist '("\\.rake$" . ruby-mode))
(add-to-list 'interpreter-mode-alist '("ruby" . ruby-mode))
(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")
(add-hook 'ruby-mode-hook
'(lambda ()
(inf-ruby-keys)))
(autoload 'rubydb "rubydb3x" "Ruby debugger" t)
(add-hook 'ruby-mode-hook 'turn-on-font-lock)
(add-hook 'ruby-mode-hook (lambda ()
(make-variable-buffer-local 'compilation-error-regexp-alist)
(setq compilation-error-regexp-alist
(append compilation-error-regexp-alist
(list (list
(concat "\\(.*?\\)\\([0-9A-Za-z_./\:-]+\\.rb\\):\\([0-9]+\\)") 2 3))))
(make-variable-buffer-local 'compile-command)
(setq compile-command (concat "ruby " (buffer-file-name) " "))))
(setq ri-ruby-script "~/.emacs.d/ri-emacs/ri-emacs.rb")
(autoload 'ri "~/.emacs.d/ri-emacs/ri-ruby" nil t)
(add-hook 'ruby-mode-hook (lambda ()
(require 'speedbar)
(require 'rails)
(local-set-key [C-c C-o] 'ri)
(local-set-key [M-C-i] 'ri-ruby-complete-symbol)
(local-set-key [C-c C-a] 'ri-ruby-show-args)))
--
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-09-22 22:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-22 21:07 ruby and emacs aidy lewis
2008-09-22 22:40 ` Lennart Borgman (gmail)
[not found] <mailman.19721.1222122917.18990.help-gnu-emacs@gnu.org>
2008-09-22 22:47 ` Joost Diepenmaat
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.