ActiveState announced the release of Komodo Edit 4.3 last week, the first version of the cross-platform programming tool to be distributed as open source. Komodo Edit is now tri-licensed under the MPL, GPL, and LGPL, just like Firefox. Through the OpenKomodo initiative, ActiveState has been working closely with Mozilla developers and the open-source software community in an effort to create an open platform that can provide a foundation for scripting and web application development tools.

The OpenKomodo project has the potential to become for scripting what Eclipse is for Java. Komodo leverages Mozilla's XUL framework which makes it easy to repurpose and imbues it with a very high level of extensibility. OpenKomodo is currently being used as the basis for Snapdragon, a web development tool for client-side scripting that integrates closely with Firefox. Other projects based on the OpenKomodo code base will likely emerge as the project matures.

I tested Komodo Edit on Ubuntu 7.10 to determine if it is worthy of replacing Vim, which I have used religiously for the past eight years. Komodo Edit failed to meet my impossibly high standards, but it came closer to defeating my Vim fixation than any other programming environment that I have ever tested. Komodo Edit has a decent range of features that put it squarely between a conventional editor and a full-fledged IDE. The feature set includes basic project management, a snippet system, effective find-and-replace with support for regular expressions, extremely robust support for plug-ins and user modification, a tab-based multiple document interface, syntax highlighting and folding, code completion and tips, and basic code validation.

The project management system is very lightweight and noninvasive. It won't generate code for you, but it also won't force you to follow any predetermined directory structure for your programs. When you create a project file, Komodo Edit will automatically display in the project pane the entire tree of the directory in which the project is saved. You can also add references to files and directories that are outside of the project's directory structure.

Editing features

Komodo edit uses Scintilla for its editing component but offers a few unique twists. For instance, it comes with passable Vi and Emacs keybinding schemes. The Vi scheme doesn't just shift around a few key bindings, it completely changes the way the editor operates. With the Vi scheme, you get a full command system with colon prompt as well as a normal mode, visual mode, and insert mode, just like the real thing. It's the margarine to Vim's delicious butter.

Most of the standard normal mode directional commands work, even with numerical prefixes, and you can also do substitutions from the command system with regular expressions just like you would with Vim (it works on visual mode selection blocks too). Komodo Edit can replicate Vim's functionality with a level of accuracy and attention to detail that I've simply never seen before. I also briefly tested the Emacs mode, and it worked pretty well, but I can't really judge it accurately since I'm not really an Emacs user myself.



The Komodo start page

One of the other impressive features of Komodo Edit is the ease with which it can be modified. Its add-on system is very similar to that of Firefox and there are a number of intriguing third-party add-ons available online. Support for additional programming languages and features can be added and developed without a lot of difficulty. There are simpler ways to extend Komodo as well. You can add new commands which can be bound to keyboard events, menu items, and toolbar buttons. Custom commands can be external scripts or command line expressions that filter or manipulate content. Komodo Edit also supports macro recording and allows users to create their own macro-based enhancements with either Python or JavaScript. Your macros are even made accessible through the colon prompt when you use Vi mode.



The Komodo extension manager

Komodo Edit's code completion is pretty much on par with Vim's omnicomplete feature. I tested it with Python and found that it was able to provide adequate completion in most cases, but obviously can't do it in situations where there isn't sufficient type information. It also provides tooltips with parameter hints in some cases.

Still not quite there yet

Although I'm very impressed with Komodo Edit's power and extensibility, there are a few places where it falls short of my expectations. The biggest disappointment is that it doesn't support multiple split editing panes. You can only create one split and view a maximum of two text buffers at any given time. This is particularly frustrating for me, because I'm used to looking at three or four buffers at once with Vim, which allows the viewing window to be split as many times as the user wants. Another aspect that frustrated me is that I couldn't find a way to move the Toolbox or Project tabs so that they are in the same column. Having one on each side of the editing window wastes a lot of screen space, and I'd much rather stack them vertically on the left-hand side.



The Komodo editor

For comparison purposes, I also briefly looked at ActiveState's commercial version (there is a free trial available), Komodo IDE. The Komodo IDE has some really nice additional features, like version control functionality and an integrated graphical debugger that works with an impressive number of programming languages, including JavaScript. Although the extra features would likely be worth the $295 license fee for a serious programmer who works extensively with several of the supported programming languages, it isn't a particularly good value for my limited needs. On the rare occasions when I require a Python debugger, for instance, I'm perfectly satisfied with using an external tool like Winpdb. For an overview of the differences, check out the feature comparison matrix on the ActiveState web site.

A bright future for scripting tools

Dynamic scripting languages like Python, Ruby, and JavaScript are rapidly increasing in importance as developers shift away from the desktop and start moving their applications into the cloud. Tools for that kind of development are needed now more than ever before. Komodo Edit is good in that context, because it supports both the back-end languages and the front-end languages.

There are a few competing open source tools that don't have quite so broad a scope but are still worth mentioning. For Python development, I think that Eric3 (it has an excellent graphical debugger) and PIDA (it has real Vim integration) are both pretty darn good. For web development, I think the KDE-based Quanta editor is the best open source solution. KDE also has a pair of cool graphical debuggers for JavaScript and XSL. Web developers might also like Mozilla's Venkman javascript debugger (it's klunky, but it's not bad when it works right) and Firebug (the single most useful Firefox add-on ever created).

Developers who work with dynamic languages will likely see tools continue to improve as the languages themselves evolve. Python 3, for instance, will support type annotations that will make it much easier for autocompletion systems to operate effectively and for code validation tools to preemptively find bugs. The rate at which open source software development tools are advancing illuminates a lot of exciting possibilities that are just over the horizon. What tools do you use?