* Ruby
@ 2009-05-11 19:59 Vladimir Passwordoff
0 siblings, 0 replies; 2+ messages in thread
From: Vladimir Passwordoff @ 2009-05-11 19:59 UTC (permalink / raw
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 180 bytes --]
Can anyone, who program on Ruby, share the bit of ~/.emacs with ruby
configuration, and the ruby-files for emacs? I only install the irb and
ruby-mode, but ri, flymode - i cannot.
[-- Attachment #2: Type: text/html, Size: 185 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Ruby
[not found] <mailman.7026.1242077469.31690.help-gnu-emacs@gnu.org>
@ 2009-05-11 22:06 ` Anselm Helbig
0 siblings, 0 replies; 2+ messages in thread
From: Anselm Helbig @ 2009-05-11 22:06 UTC (permalink / raw
To: help-gnu-emacs
At Mon, 11 May 2009 23:59:48 +0400,
Vladimir Passwordoff <passvvordoff@gmail.com> wrote:
>
> [1 <text/plain; ISO-8859-1 (7bit)>]
>
> [2 <text/html; ISO-8859-1 (7bit)>]
> Can anyone, who program on Ruby, share the bit of ~/.emacs with ruby configuration, and the ruby-files for emacs? I only install the irb and ruby-mode, but ri, flymode - i
> cannot.
See the emacswiki for setting up flymake
http://www.emacswiki.org/emacs/FlymakeRuby
I'm using emacs-rails which already sets this up for you:
http://dima-exe.ru/rails-on-emacs
(I don't really like the fact that emacs-rails configures so much
stuff for you: it's generally easier to turn on a feature you want
than to turn off a feature that you don't want - in the latter case
you don't know where it was activated and what was done to configure
it.)
For ri, I use the fastri gem which includes the `ri-emacs'
executable. Note that you have to start a fastri-server before you can
use it (should be done in some startup script). You still need to get
ri-ruby.el from http://rubyforge.org/projects/ri-emacs/ and put it
somewhere in your emacs load-path:
(mapc (lambda (func)
(autoload func "ri-ruby" nil t))
'(ri ri-ruby-complete-symbol ri-ruby-show-args))
;; this only works if ri-emacs can be found in your PATH
(setq ri-ruby-script (locate-file "ri-emacs" exec-path))
;; the default ANSI colours are not really readable with a light background
(setq ansi-color-names-vector ["black" "red" "#009900" "yellow" "blue" "magenta" "#990099" "white"])
(setq ansi-color-map (ansi-color-make-color-map))
(add-hook 'ruby-mode-hook
(lambda ()
(local-set-key "\M-\C-i" 'ri-ruby-complete-symbol)
(local-set-key (kbd "<f4>") 'ri-ruby-show-args)))
Apart from the rails-specific stuff I only have these smaler
customizations for ruby:
;; allows for navigation by word in camel-cased constants
(defun turn-on-c-subword-mode () (c-subword-mode 1))
(add-hook 'ruby-mode-hook 'turn-on-c-subword-mode)
;; highlight some keywords
(font-lock-add-keywords 'ruby-mode
'(("\\<\\(FIXME\\|HACK\\|XXX\\|FLUNK\\|TODO\\|ToDo\\)" 1
font-lock-warning-face prepend)))
;; highlights matching blocks, get it from
;; http://www.emacswiki.org/emacs/ruby-block.el
(autoload 'ruby-block-mode "ruby-block" nil t)
(add-hook 'ruby-mode-hook (lambda () (ruby-block-mode t)))
My other customizations are either too specific (rails) or too general
to mention here.
HTH,
Anselm
--
Anselm Helbig
mailto:anselm.helbig+news2009@googlemail.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-05-11 22:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.7026.1242077469.31690.help-gnu-emacs@gnu.org>
2009-05-11 22:06 ` Ruby Anselm Helbig
2009-05-11 19:59 Ruby Vladimir Passwordoff
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.