Some months ago since I started using jEdit I also started improving the gtksouceview language definition for ruby and Rails code for use with Gedit, because in most of cases Gedit is faster than jEdit, Now I have some improvements to show.
I used as base for show improvements some screenshots that I made from Railscasts, so I got some episodes that have the “little things” I’ve changed.
This first is a screnshot of Railscasts Episode 33, here we can see the function name properly highlighted and also some Rails specific methods. We can compare the Gedit Screenshot to TextMate screenshot and see that all:
Here we have a rhtml (html.erb) shippet from Episode 37, all tags are highighted properly, including xml markup and erb markup “<%= %>”:
In this (Episode 62) we have a classmethod correctly highlighed (here I prefered to let “self” keyword in the same color of methodname, but is possible to change in future), and the method definitions including method names ending with ?, ! (= signal in the first screenshot):
And last an example of string interpolation (Episode 69), that already exists in original language definition but doesn’t work(I don’t know exactly why), the approach of original attemp is to change the context of string back to main context, by this way the code “should” be highlighted as normal ruby code, and in theory could be other interopated strings in many levels, but, that doesn’t work and I changed to just colorize (I mean this should be the default and correct way) and interpolation is highlighted properly:
You can download a package I made, containing some useful plugins, code snippets and
the language definition. this pack is very useful also if you just installed linux (I use ubuntu) and need quick setup to a Rails development environment
The package also include Extract partial plugin and a Smart indent plugin
How to install.
download the package here in some place
open a terminal go to the place of download and type
$tar -zxvf [name of downloaded tarball] $./install.sh
WARNING: Some commands need sudo password, so you will be asked.
Open gedit chose your preferred color, enable your preferred plugins and enjoy.
(The package also include the TODO-List plugin and you will need to follow plugin README to install)