Using jEdit for Ruby on Rails Development

I really like TextMate on my Mac Book Pro. And, I really like using TextMate for Ruby on Rails, it’s just such a good fit. However, most of my students are using Linux or Windows. After getting asked many, many times for a recommendation for something like TextMate I have written up this article for using my old favorite editor jEdit

jEdit Install

First, you have to download and install jEdit for your operating system. I’m using version 4.3pre9 for these instructions. Then install the usual collection of plugins that make jEdit really usable. Here is a good list to get you going:

  • BufferList
  • BufferTabs
  • Common Controls
  • Console
  • ErrorList
  • Info Viewer
  • jDiff
  • JTidy
  • MacroManager
  • TextTools
  • Whitespace
  • Xerces
  • XInsert
  • XML
  • XML Indenter

    Looking Sharp!

    The first step on the journey is to be able to quickly and nicely change the look of the editor. The plugin Editor Scheme Selector makes this happen. Install it from the Plugin Manager. Once installed select it from the Plugins menu. It will display a nice list of schemes, try them out! You can also download more from here including one suspiciously named “TextMate-like Editor Scheme”.

    UPDATE: RecentBufferSwitcher

    On of the nice features of TextMate is the “Go To File…” command which is mapped to command-t. The feature is a very nice way to navigate around in the files in a project. There is a jEdit plugin named RecentBufferSwitcher that is almost as good. I map it to the same key combination and or to control-t on Lunix and it works well. The plugin can be loaded from the Plugin Manager.

    Ruby

    Now we will focus on editing Ruby in jEdit. With the Plugin Manager install the Ruby Plugin. This plugin’s “features include method completion for system types and Rails classes, integrated Ruby docs, syntax error highlighting, auto indent and insert end, structure browser, file structure popup, navigation shortcuts, and progressive selection.” (From the Ruby Plugin documentation.)

    SideKick

    The Ruby plugin also requires the plugin SideKick. If it doesn’t not install automatically as a dedendency then install it manually. You also should configure a keystroke shortcut.

    SuperAbbrevs

    Ah, the grand finale. The SuperAbbrevs plugin is what seems to be doing all the magic. This plugin is what performs all the snippet work that people really like about TextMate. As someone who uses both TM and jEdit I will say that TM is better overall and a must have. But, if I need to work on Windows or Linux (God forbid!) I would use this setup and be mostly happy.

    I am using the beta version of SuperAbbrevs (v0.21) from here . Once you install it run the menu item “Plugins->Plugin Options->SuperAbbrevs->Abbreviations” and press the button “Import normal abbrevs”. This is important as there won’t be any abbreviations until you do this.

    Abbrevs for Rails

    The final step is to download some abbreviations for Rails from here. (UPDATE: Here is the zip file jEdit Snippets for Rails.) Unzip the downloaded .zip file and place the files “rhtml” and “ruby” into your .jedit/SuperAbbrevs/ directory.

    Once you have all this installed then read the documentation for all these plugins from the help window.

5 Comments on “Using jEdit for Ruby on Rails Development”

Sune Simonsen, November 14th, 2006 at 5:14 pm

Your link to the SuperAbbrevs plugin is broken, the right link is http://community.jedit.org/?q=node/view/2761

KoSI Knowledge Blog » Archiv » jEdit Mac-Style, November 24th, 2006 at 2:30 pm

[...] Einen Hoffnungsschimmer gibt es aber immerhin für all die verlorenen Windows/Linux-Wesen. jEdit, bekanntlich “programmer’s text editor”, lässt sich mit wenigen Handgriffen zu einem waschechten TextMate-Fake aufboren. [...]

[...] 4:20 pm 依著 Eric Knapp 的 Using jEdit for Ruby on Rails Development ,混合多種 jEdit Plugins,即可以打做出與 Textmate 相類似的 ROR 編程環境。 [...]

Ryan Smith, April 12th, 2007 at 9:37 am

Thanks for the jEdit tips and tricks. For those of us in the forced-position of using PC’s instead of the favored Mac, I fully understand the weight of your plight. I am actually getting myself up-to-speed with Linux Ubuntu so that I can further distance myself from anything Microsoft.

Maybe you could write a similar article about how to get close to TextMate within a Linux distro?

Thanks again,
_rs

sanrin - Software libre para IT, June 8th, 2007 at 6:04 am

[...] encontrado en este post una forma de configurar el editor jEdit para utizarlo como herramienta de desarrollo de forma [...]