content/articles/komodo-edit-review.textile
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 |
----- permalink: komodo-edit-review filters_pre: - redcloth title: A closer look at Komodo Edit date: 2007-11-25 07:23:00 +01:00 tags: - review programming software type: article ----- <a href="http://digg.com/programming/A_closer_look_at_Komodo_Edit"> <img src="http://digg.com/img/badges/180x35-digg-button.png" width="180" height="35" alt="Digg!" /> </a> _What's your favorite code editor?_ This is a common question which still keeps popping up on community boards, mailing lists, comments, etc. Every programmer who writes code in some programming language normally has an editor of choice. Being realistic, most of the times it's not only one program but several, depending on the language and on the features needed at the time. Yes, great, but how do you choose your favorite editor? By trying a lot of them of course: that's what I've been doing since I started programming. Lately I've become fond of "Vim":http://www.vim.org (or better, gVim), although I have a few other editors I may recommend, e.g.: * "Notepad++":http://notepad-plus.sourceforge.net/uk/site.htm * "Intype":http://intype.info/home/index.php * "SciTE":http://scintilla.sourceforge.net/SciTE.html Recently, however, I came across my _n^th^_ "what's your favorite editor" thread and someone mentioned "Komodo Edit":http://www.activestate.com/Products/komodo_edit/. I knew of it already, actually, but I never had a chance to give it a _proper_ try. ActiveState is well known mainly for two things: * Their effort in offering a lot of commercial, windows-based Perl libraries * Their commercial IDE, Komodo IDE, which I personally tried quite a long time ago The problems of Komodo IDE are foundamentally two: * It costs money – this is not great in a world where Eclipse and Netbeans are free * It is an IDE – which normally means _'heavy as hell'_. It's a matter of taste and needs: some people feel more confortable with using an editor for certain tasks, while sometimes an IDE may be the best solution, despite its potential slowness and bulk. Komodo Edit solves the above-mentioned problems because: * It's free * It's an editor Actually I wouldn't call it an editor, because it offers quite a lot of features which are normally absent in editors -- it's something in-between, which definitely deserves a try. h2. User interface Komodo Edit's interface is one of the most clear I've ever come across. It is organized in four main areas plus the top menu and toolbar (which only has the buttons you REALLY need, unlike Notepad++'s 31-button-bar). !=/files/komodo_main.png! The central area is for editing, the left pane is for the Project browser, the right one is for the Toolbox and the bottom pane is for command output. Luckily enough, a set of handy little buttons is provided in the toolbar to show and hide each pane. I normally only use the Project Browser and the main editing area, leaving the Toolbox and Command Output panes hidden, but that's up to you really. !</files/komodo_show-hide_pane.png! Komodo Edit allows symultaneous editing of multiple documents, which means that it has tabs like most of the best editors out there. Furthermore, it is possible to have Komodo re-open the files edited in the last editing session, saving you a lot of time. Granted, a lot of IDE do, but this is *NOT* an IDE, remember? It's an _editor_, or at least it is advertised as such. In reality it has _most_ of the power of a full-blown IDE though normally remaining under the 60K memory usage (out of 2GB of total RAM) -- which is not that bad, considering what Eclipse and NetBeans need. Out of all the "extra features":http://www.activestate.com/Products/komodo_edit/edit_vs_ide.plex offered by Komodo IDE, the only one I truly miss is the Code Browser. Other than that, it quickly became my editor/IDE of choice (when gVim isn't looking, of course...) Lets find out why... h2. Editing features Komodo Edit comes with all the editing features of ever average editor, so _"[...] Code commenting, auto-indent and outdent, block selection, incremental search, reflow paragraph, join lines, enter next character as raw literal, repeat next keystroke and clean line endings on "save"."_, it uses Scintilla as main editing component, which makes it a close relative of Notepad++, Notepad2 and of course SciTE when it comes to understanding languages and syntax highlighting. This is good, of course, as Scintilla is an excellent editing component, but – I have to say this – not as good as Vim when it comes to syntax highlighting (nothing is as good as Vim though, so I can't really complain!). As you can see from the screenshot I included earlier on, it is possible to change the default black-on-white color scheme to something more stimulating and energy-saving. This doesn't mean I have to manually re-set the color of each element, it actually comes with a black-background scheme, which is handy. h3. Supported Languages & Syntax Highlighting Komodo Edit supports quite a few programming languages, which means it can recognize the most common ones (C, C++, Java, PHP, Python, Ruby, Perl) but it also smart enough to notice framework-specific syntaxes like Smarty, Django or RHTML. Like every scintilla-based editors, it sports a nice HTML multi-highlighter which allows you to keep putting all the Javascript, CSS and server-side scripting into the same file, GREAT! No, you probably wouldn't want to do that, but it's a good thing to have. h3. Auto-completion What makes this editor a really handy tool is its auto-completion capabilities. Why? well, because it supports: * Ruby: require, class modules (on . and ::), class variables and methods, method calltips. * Python * Perl * PHP * XSLT * XML * Tcl Why is this so special? Well, because if you want this you normally need an IDE, and if you want it for Ruby AND Python AND Perl your choices are very limited. I played with the Ruby auto-completion features quite a bit, and I'm actually really impressed. !>/files/komodo_auto-completion.png! It can suggest what to write through calltips after a @require@ directive, after a . and a ::, and hitting CTRL+SPACE (or just tab if you configure the right option) will auto-complete what you're writing, be it a language keyword, a variable of any kind or a method. Additionally, it comes with "soft characters support", which means it will try to match ( [ { when possible, allowing you to _write over_ the completed character if you want to. h3. Syntax Checking, Vi/Emacs key bindings and code folding The heading is almost self-explanatory here: Komodo Edit supports code folding (you can even chose the folding chracters!) for all its supported languages, syntax checking (it can detect and display errors before running the script, very useful in Ruby, and hard to find in other editors) and Vi/Emacs key bindings. It also offers "vi emulation", which is constantly improving through every release – so you won't forget Vim's keys when I don't use it: very nice, and again, hard to find in other editors, nevermind IDEs! h2. Projects and Tools !>/files/komodo_toolbox.png! The Project Browser and Toolbox are two features which are normally presents in IDEs and which are normally not found in editors. Granted, some editors like "PSPad":http://www.pspad.com/en/ do indeed have "projects", but most of the others don't. A _project_ in Komodo Edit is normally composed by: * Some _Live Folders_ including all the source files of the application you're developing * An optional set of tools, commands, snippets and other goodies which may help you coding that particular application. It is possible to create these tools by clicking the *Add Item to current project* button in the Projects toolbar or by clicking the *Add Item to Toolbox* button just over the toolbox. Either way, you can choose among the following: h4. File/Remote File Add a file on your local machine or a remote file hosted on a server you configured via *Edit > Preferences > Servers*. Supported protocols are: FTP,FTPS, SFTP, SCP. h4. Folder This will _not_ link to a folder and import local files in Komodo, instead, it will create a container for other tools, not for local files. h4. Live Folder On the contrary, a live folder links to an actual folder on your machines, and all files and directories inside it are automatically imported. Note that it is possible to choose to include or exclude certain files or directories from being imported by right-clicking the folder and editing its properties. h4. Command This will create a shortcut to a command to execute. It is possible to specify its parameters, the directory where it will be run, whether its output will be displayed in the Command Output or in a newly-spawned console window, etc. etc. h4. Snippet TextMate fans will love this. Komodo will let you create a code snippet for later use. Furthermore, it is possible to specify "tabstops" to automatically select certain words when tab is pressed (so you can effectively fill in only particular fields of the snippet). h4. Template A simple but effective way to create code templates. h4. Url A link which will open a given url. h4. Open... Shortcut This will popup an *Open File* dialog in a direcxtory of your choice. h4. Macro For those who require even more customization, it is also possible to record or code macros in Python or javascript, and then configure their key bindings and triggers. h4. Custom Menu/Custom toolbar This was really impressive. Sure you can group all your tools in folders in your current project or you can create them in the toolbox to make them available all the time, but it would be cool if _the editor itself_ could make those tools available by default in a toolbar or a menu. Well, that's possible: all you need to do is create a new custom menu or toolbar and populate it with your tools by drag and drop. Very, very nice! This mini-framework to create custom tools can be used to create project templates in a blink. To show this concept, Komodo Edit comes with a Rails template with almost all the tools you need when coding a Ruby on Rails application: * Create/delete database * Generators * Migrations * Run server * Example view snippets h2. Conclusion Komodo Edit is an interesting editor which offers a lot of features which are normally only available in IDEs at a smaller memory footprint. Granted, when I want to jot something down I still prefer to fire up gVim, but for a serious coding session, Komodo is the right choice. Its close attention to details and its ease of use make developing an even more pleasant experience, although perhaps there's still room for improvement, if you're really fussy. Sometimes when you start getting used of its advanced features, the lack of a code browser seems a real shame, but after all, ActiveState must sell their IDE to someone at some point! Another thing which I would have liked is the ability to create new syntax highlighting schemes, which Notepad++ and VIM both offer. Whydoes it bothers me so much? Well, because I'd like a "Textile":http://textism.com/tools/textile/ syntax highlighting scheme for writing blogs and articles. VIM and Intype seem to be the only ones which offer it out-of-the-box, but there's no trace of it in Komodo Edit. Actually it is possible to create new syntax highlighting schemes and extend Komodo Edit via "XUL extensions":http://community.activestate.com/addons, exactly like Firefox. After a closer look, the Django syntax was added in this way. Unfortunately there aren't that many extensions available for Komodo Edit, yet, but the "Activestate Community":http://community.activestate.com/ seems very active, so you never know. Additionally, the recently-started "OpenKomodo":http://www.openkomodo.com/ is a new project created by ActiveState to "[...] create an open source platform for building developer environments. ActiveState has open-sourced elements of Komodo Edit, a free multi-language editor for dynamic languages based on Komodo IDE, to create the Open Komodo code base". A new competitor for Eclipse and Netbeans will be available soon? <a href="http://digg.com/programming/A_closer_look_at_Komodo_Edit"> <img src="http://digg.com/img/badges/180x35-digg-button.png" width="180" height="35" alt="Digg!" /> </a> |