Yesterday i wrote about emacs syntax highlighting.. but.. honestly.. i think I like using gedit with a couple plugins instead
http://www.thaumatocracy.com/textpad-for-linux
Posted by linuxhappy on February 3, 2008
Yesterday i wrote about emacs syntax highlighting.. but.. honestly.. i think I like using gedit with a couple plugins instead
http://www.thaumatocracy.com/textpad-for-linux
Posted in Ruby, Rails, or Ruby on Rails | Leave a Comment »
Posted by linuxhappy on February 2, 2008
Found this awesome link for getting ruby syntax highlighting in emacs and seems to work swell in for Ubuntu 7.10.
http://sodonnell.wordpress.com/2007/06/21/emacs-ruby-foo/
wget http://svn.ruby-lang.org/repos/ruby/tags/v1_8_5_53/misc/inf-ruby.el wget http://svn.ruby-lang.org/repos/ruby/tags/v1_8_5_53/misc/ruby-mode.el sudo cp inf-ruby.el /usr/local/share/emacs/22.1/site-lisp/. sudo cp ruby-mode.el /usr/local/share/emacs/22.1/site-lisp/.
then… copy and paste this into your ~/.emacs file
;loads ruby mode when a .rb file is opened.
(autoload 'ruby-mode "ruby-mode" "Major mode for editing ruby scripts." t)
(setq auto-mode-alist (cons '(".rb$" . ruby-mode) auto-mode-alist))
(setq auto-mode-alist (cons '(".rhtml$" . html-mode) auto-mode-alist))
Now you’re on your way to open your .rb files (assuming font-lock-mode is on) with syntax highlighting!
(Alt-x font-lock-mode)
Posted in Ruby, Rails, or Ruby on Rails | Tagged: emacs, ruby syntax highlighting | 5 Comments »