Saturday, August 4, 2007

Make gedit behave roughly like Textmate

I stumbled upon an interesting blog post, which is describing howto change gedit to behave roughly like textmate. I use ubuntu freisty fawn on my devlepoment machines and it took me more than an hour to get clear about the things i have to change. Because i have to maintain some more developing machines, i packed together some useful plugins ready for copy and paste.

The available plugins can be found on the Gnome/Gedit site

Step One: Get plugins available via apt-get
  • Snippets
  • File Browser
$sudo apt-get install gedit-plugins
Step Two: Download & uncompress this file

This file contains following Plugins:
the font "monaco", the color schemes for highlighting ruby and rhtml and the mime type definitions for rhtml (Note: I can't get the mime types get to work properly. Maybe you have some suggestions?)
$tar xvzf gedit-mate.tar.gz
$cd ./gedit-mate
$ls -a
$>. .. .fonts .gconf .gnome2 plugins rhtml_definitions
Step Three: Colors for Synax Highlighting & Fonts

You can copy the folders ".fonts .gconf .gnome2" straight in your home directory. The contents of the folders are responsible for the colors of syntax_highlighting and brings you the font "monaco". Keep in mind, that you have to set the font and the background color by yourself.

$ cp -R .fonts .gconf .gnome .gnome2 ~/


Step Four: Create the MimeType for ".rhtml" files

Change in the "rhtml_definitions" directory and copy the files
$cd ./rhtml_definitions
$ sudo cp x-rhtml.xml /usr/share/mime/packages/
$ sudo cp rhtml.lang /usr/share/gtksourceview-1.0/language-specs/
Step Five: Copy the Plugins

Change in the "plugins" directory and copy all of them into /usr/lib/gedit-2/plugins
This was the only directory that worked for me. Maybe ~/.gconf/apps/gedit-2/plugins will work for you.
$cd ../plugins
$sudo cp -R ./* /usr/lib/gedit-2/plugins/
Step Six: Restart your session and enjoy.

10 comments:

egg said...

Hi,

I'm using gedit for rails development too, works fine !

If I got time I'll start to make a syntax highlight for haml

egg said...

btw, for the mime type try:

sudo update-mime-database /usr/share/mime

egg said...

For me works to put the plugins into:

~/.gnome2/gedit/plugins

Sebastian said...

I used netbeans before gedit. I liked it very much, but netbeans isn't fast enough.

thanks for the tip with update-mime-database, i will try this.

Anonymous said...

Hi,
can you upload again the file from step two?

Thx

polypus said...

i just did a little write up on using the latest version of gedit for rails, check it:

http://crepuscular-homunculus.blogspot.com/2007/10/gedit-for-ruby-and-everything-else-on.html

Mark Bykerk Kauffman said...

I'm stuck behind a firewall that won't let me hit port 8080 where you've got the file for step 2 stored. Do you have an ftp, or can you get it behind port 80 somewhere? Thanks!

fiXedd said...

the downloadable file can not be found

LT said...

I created this cheat sheet for rails development in gedit:
http://www.scribd.com/doc/6299312/Gedit-Cheat-Sheet-for-Rails-Development

Eda said...

hello,
I found and tried this free unlimited sms to all network website. You can send unlimited texts to all Philippine subscribers.
We can also meet new friends and txtmates through discussion and chat.

Visit this link http://www.txtmate.com