Fixing e-texteditor to Properly Highlight View Layouts in Rails 2.0.2
Thursday, May 29th, 2008For Windows-based Ruby on Rails developers, the e-texteditor is an excellent editor to use for your work. It’s a work in progress but the features are based on the highly acclaimed editor, TextMate for Mac OS X. In fact, most of the “bundles” are directly compatible between the two clients.
In Rails 2.0.2, view layout files were changed to use the .erb file extension instead of the previeous .rhtml. This means that editors that use file extensions to determine which syntax highlighting pattern to load will no longer highlight your Rails views properly.
In order to correct this we’ll need to edit our Rails bundle to include .erb files in the files we use our Rails syntax highlighting for.
Start by going to the menu bar in e-texteditor and select: Bundles -> Edit Bundles -> Show Bundle Editor. This will give you your bundle editing screen as shown below:
Scroll down until you find the “Rails” bundle. Expand that and scroll down to find the HTML (Rails) section. Click this section and you will be presented with the bundle text itself used to determine highlight rules. We’re looking for a spot in this section where the file associations are listed. See below:
Change the filetypes association language to include erb files shown below:
Presto! Close the editor (no need to save, it does it automagically) Now open a .erb view and your syntax highlighting should work again just as shown:
I imagine future versions of the Rails bundle will account for this automatically. There is a similar fix procedure for fixing TextMate for Rails 2.0.2.
Hope this helps.







Save to Browser Favorites
Ask
backflip
blinklist
BlogBookmark
Bloglines
BlogMarks
Blogsvine
BUMPzee!
CiteULike
co.mments
Connotea
del.icio.us
DotNetKicks
Digg
diigo
dropjack.com
dzone
Facebook
Fark
Faves
Feed Me Links
Friendsite
folkd.com
Furl
Google
Hugg
Jeqq
Kaboodle
linkaGoGo
LinksMarker
Ma.gnolia
Mister Wong
Mixx
MySpace
MyWeb
Netvouz
Newsvine
PlugIM
popcurrent
Propeller
Reddit
Rojo
Segnalo
Shoutwire
Simpy
sk*rt
Slashdot
Sphere
Sphinn
Spurl.net
Squidoo
StumbleUpon
Technorati
ThisNext
Webride
Windows Live
Yahoo!
Email This to a Friend
If you like this then please subscribe to the 
easy-going style invites audience participation and makes whatever he’s talking about very approachable. Dave started a working group called 