Saturday March 08, 2008

   Ruby on Rails in Gedit

There are a few tutorials out there to make gedit act like textmate.. I have to say, using textmate for nearly a month, I see things gedit can do that textmate can't! I guess I have linux in the blood..

Heres how to rubify your gedit!

First Install the plugins for gedit
sudo apt-get install gedit-plugins

Next, visit Insane Terminology as he has a good explanation on how to get syntax highlighting working in gedit! I'll summarize for the impatient.

If you have any installed mime packages in Override.xml remove them
rm ~/.local/share/mime/packages/Override.xml

Next we go to where the real mime packages/definitions are stored and download the mime type definitions courtesy Insane Terminology
cd /usr/share/mime/packages
sudo wget http://robzon.kapati.net/rails/rails.xml
sudo update-mime-database /usr/share/mime

Now to finish it up, we'll get syntax highlighting corrected for .rhtml (.html.erb) files.
cd /usr/share/gtksourceview-2.0/language-specs/
sudo wget http://robzon.kapati.net/rails/rhtml.lang

Theres a heap of plugins for gedit, search the net for them, they transform gedit from windows notepad to a real ide.
One thing I will mention, I have created shortcut on my top panel (taskbar, or whatever you want to call it). I've edited the gedit properties (i.e. right click --> properties) and changed
gedit %U
to
gedit %U --new-window

This allows multiple gedit windows



Back