Monday, May 5, 2008

Ruby and Emacs!!

I usually use textmate, but when I am on Linux I am always frustrated, so I finally got emacs to recognize ruby!

Here is a link to where I got my ruby-mode.el file.

It does not matter where you put the ruby-mode.el file, just put it somewhere pertinent. Many people recommend:

$HOME/.emacs.d/ruby-mode.el


Then add the following to your .emacs file:

(load "~/.emacs.d/ruby-mode")


Now, when you open a ruby file you need to tell emacs that it is a ruby file, so open the buffer and type:
Meta-x ruby-mode


And everything should work

This is also a good reference on loading an el file in emacs.

No comments: