all repos — h3rald @ a86846e227cd82435a2b8b9d08b8f8e4138e838d

The sources of https://h3rald.com

contents/articles/komodo-edit-review.html

 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
-----
title: "A closer look at Komodo Edit"
content-type: article
subtitle: "A comprehensive review of the free editor from ActiveState"
timestamp: 1195971780
tags: "review|programming|software"
-----
<p><a href="http://digg.com/programming/A_closer_look_at_Komodo_Edit"><br />
<img src="http://digg.com/img/badges/180x35-digg-button.png" width="180" height="35" alt="Digg!" /><br />
</a></p>
<p><em>What&#8217;s your favorite code editor?</em></p>
<p>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&#8217;s not only one program but several, depending on the language and on the features needed at the time.<br />
Yes, great, but how do you choose your favorite editor?<br />
By trying a lot of them of course: that&#8217;s what I&#8217;ve been doing since I started programming. Lately I&#8217;ve become fond of <a href="http://www.vim.org">Vim</a> (or better, gVim), although I have a few other editors I may recommend, e.g.:</p>
<ul>
	<li><a href="http://notepad-plus.sourceforge.net/uk/site.htm">Notepad++</a></li>
	<li><a href="http://intype.info/home/index.php">Intype</a></li>
	<li><a href="http://scintilla.sourceforge.net/SciTE.html">SciTE</a></li>
</ul>
<p>Recently, however, I came across my <em>n^th^</em> &#8220;what&#8217;s your favorite editor&#8221; thread and someone mentioned <a href="http://www.activestate.com/Products/komodo_edit/">Komodo Edit</a>. I knew of it already, actually, but I never had a chance to give it a <em>proper</em> try. <br />
ActiveState is well known mainly for two things:</p>
<ul>
	<li>Their effort in offering a lot of commercial, windows-based Perl libraries</li>
	<li>Their commercial <span class="caps">IDE</span>, Komodo <span class="caps">IDE</span>, which I personally tried quite a long time ago</li>
</ul>
<p>The problems of Komodo <span class="caps">IDE</span> are foundamentally two:</p>
<ul>
	<li>It costs money &#8211; this is not great in a world where Eclipse and Netbeans are free</li>
	<li>It is an <span class="caps">IDE</span> &#8211; which normally means <em>&#8216;heavy as hell&#8217;</em>.</li>
</ul>
<p>It&#8217;s a matter of taste and needs: some people feel more confortable with using an editor for certain tasks, while sometimes an <span class="caps">IDE</span> may be the best solution, despite its potential slowness and bulk.</p>
<p>Komodo Edit solves the above-mentioned problems because:</p>
<ul>
	<li>It&#8217;s free</li>
	<li>It&#8217;s an editor</li>
</ul>
<p>Actually I wouldn&#8217;t call it an editor, because it offers quite a lot of features which are normally absent in editors &#8212; it&#8217;s something in-between, which definitely deserves a try.</p>
<h2>User interface</h2>
<p>Komodo Edit&#8217;s interface is one of the most clear I&#8217;ve ever come across. It is organized in four main areas plus the top menu and toolbar (which only has the buttons you <span class="caps">REALLY</span> need, unlike Notepad++&#8217;s 31-button-bar).</p>
<p><img src="/files/komodo_main.png" alt="" /></p>
<p>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&#8217;s up to you really.</p>
<p style="float:left;"><img src="/files/komodo_show-hide_pane.png" alt="" /></p>
<p>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 <span class="caps">IDE</span> do, but this is <strong><span class="caps">NOT</span></strong> an <span class="caps">IDE</span>, remember? It&#8217;s an <em>editor</em>, or at least it is advertised as such.</p>
<p>In reality it has <em>most</em> of the power of a full-blown <span class="caps">IDE</span> though normally remaining under the 60K memory usage (out of 2GB of total <span class="caps">RAM</span>) &#8212; which is not that bad, considering what Eclipse and NetBeans need.<br />
Out of all the <a href="http://www.activestate.com/Products/komodo_edit/edit_vs_ide.plex">extra features</a> offered by Komodo <span class="caps">IDE</span>, the only one I truly miss is the Code Browser. Other than that, it quickly became my editor/<span class="caps">IDE</span> of choice (when gVim isn&#8217;t looking, of course&#8230;)</p>
<p>Lets find out why&#8230;</p>
<h2>Editing features</h2>
<p>Komodo Edit comes with all the editing features of ever average editor, so <em>&#8220;[&#8230;] 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 &#8220;save&#8221;.&quot;</em>, 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.</p>
<p>This is good, of course, as Scintilla is an excellent editing component, but &#8211; I have to say this &#8211; not as good as Vim when it comes to syntax highlighting (nothing is as good as Vim though, so I can&#8217;t really complain!).<br />
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&#8217;t mean I have to manually re-set the color of each element, it actually comes with a black-background scheme, which is handy.</p>
<h3>Supported Languages &amp; Syntax Highlighting</h3>
<p>Komodo Edit supports quite a few programming languages, which means it can recognize the most common ones (C, C++, Java, <span class="caps">PHP</span>, Python, Ruby, Perl) but it also smart enough to notice framework-specific syntaxes like Smarty, Django or <span class="caps">RHTML</span>.<br />
Like every scintilla-based editors, it sports a nice <span class="caps">HTML</span> multi-highlighter which allows you to keep putting all the Javascript, <span class="caps">CSS</span> and server-side scripting into the same file, <span class="caps">GREAT</span>! No, you probably wouldn&#8217;t want to do that, but it&#8217;s a good thing to have.</p>
<h3>Auto-completion</h3>
<p>What makes this editor a really handy tool is its auto-completion capabilities. Why? well, because it supports:</p>
<ul>
	<li>Ruby: require, class modules (on . and ::), class variables and methods, method calltips.</li>
	<li>Python</li>
	<li>Perl</li>
	<li><span class="caps">PHP</span></li>
	<li><span class="caps">XSLT</span></li>
	<li><span class="caps">XML</span></li>
	<li>Tcl</li>
</ul>
<p>Why is this so special? Well, because if you want this you normally need an <span class="caps">IDE</span>, and if you want it for Ruby <span class="caps">AND</span> Python <span class="caps">AND</span> Perl your choices are very limited. <br />
I played with the Ruby auto-completion features quite a bit, and I&#8217;m actually really impressed.</p>
<p style="float:right;"><img src="/files/komodo_auto-completion.png" alt="" /></p>
<p>It can suggest what to write through calltips after a <code>require</code> directive, after a . and a ::, and hitting CTRL+SPACE (or just tab if you configure the right option) will auto-complete what you&#8217;re writing, be it a language keyword, a variable of any kind or a method. Additionally, it comes with &#8220;soft characters support&#8221;, which means it will try to match ( [ { when possible, allowing you to <em>write over</em> the completed character if you want to.</p>
<h3>Syntax Checking, Vi/Emacs key bindings and code folding</h3>
<p>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. <br />
It also offers &#8220;vi emulation&#8221;, which is constantly improving through every release &#8211; so you won&#8217;t forget Vim&#8217;s keys when I don&#8217;t use it: very nice, and again, hard to find in other editors, nevermind IDEs!</p>
<h2>Projects and Tools</h2>
<p style="float:right;"><img src="/files/komodo_toolbox.png" alt="" /></p>
<p>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 <a href="http://www.pspad.com/en/">PSPad</a> do indeed have &#8220;projects&#8221;, but most of the others don&#8217;t. A <em>project</em> in Komodo Edit is normally composed by:</p>
<ul>
	<li>Some <em>Live Folders</em> including all the source files of the application you&#8217;re developing</li>
	<li>An optional set of tools, commands, snippets and other goodies which may help you coding that particular application.</li>
</ul>
<p>It is possible to create these tools by clicking the <strong>Add Item to current project</strong> button in the Projects toolbar or by clicking the <strong>Add Item to Toolbox</strong> button just over the toolbox. <br />
Either way, you can choose among the following:</p>
<h4>File/Remote File</h4>
<p>Add a file on your local machine or a remote file hosted on a server you configured via <strong>Edit &gt; Preferences &gt; Servers</strong>. Supported protocols are: <span class="caps">FTP</span>,<span class="caps">FTPS</span>, <span class="caps">SFTP</span>, <span class="caps">SCP</span>.</p>
<h4>Folder</h4>
<p>This will <em>not</em> link to a folder and import local files in Komodo, instead, it will create a container for other tools, not for local files.</p>
<h4>Live Folder</h4>
<p>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.</p>
<h4>Command</h4>
<p>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.</p>
<h4>Snippet</h4>
<p>TextMate fans will love this. Komodo will let you create a code snippet for later use. Furthermore, it is possible to specify &#8220;tabstops&#8221; to automatically select certain words when tab is pressed (so you can effectively fill in only particular fields of the snippet).</p>
<h4>Template</h4>
<p>A simple but effective way to create code templates.</p>
<h4>Url</h4>
<p>A link which will open a given url.</p>
<h4>Open&#8230; Shortcut</h4>
<p>This will popup an <strong>Open File</strong> dialog in a direcxtory of your choice.</p>
<h4>Macro</h4>
<p>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.</p>
<h4>Custom Menu/Custom toolbar</h4>
<p>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 <em>the editor itself</em> could make those tools available by default in a toolbar or a menu. Well, that&#8217;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!</p>
<p>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:</p>
<ul>
	<li>Create/delete database</li>
	<li>Generators</li>
	<li>Migrations</li>
	<li>Run server</li>
	<li>Example view snippets</li>
</ul>
<h2>Conclusion</h2>
<p>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.<br />
Its close attention to details and its ease of use make developing an even more pleasant experience, although perhaps there&#8217;s still room for improvement, if you&#8217;re really fussy.</p>
<p>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 <span class="caps">IDE</span> to someone at some point!</p>
<p>Another thing which I would have liked is the ability to create new syntax highlighting schemes, which Notepad++ and <span class="caps">VIM</span> both offer. Whydoes it bothers me so much? Well, because I&#8217;d like a <a href="http://textism.com/tools/textile/">Textile</a> syntax highlighting scheme for writing blogs and articles. <span class="caps">VIM</span> and Intype seem to be the only ones which offer it out-of-the-box, but there&#8217;s no trace of it in Komodo Edit.</p>
<p>Actually it is possible to create new syntax highlighting schemes and extend Komodo Edit via <a href="http://community.activestate.com/addons"><span class="caps">XUL</span> extensions</a>, exactly like Firefox. After a closer look, the Django syntax was added in this way.</p>
<p>Unfortunately there aren&#8217;t that many extensions available for Komodo Edit, yet, but the <a href="http://community.activestate.com/">Activestate Community</a> seems very active, so you never know. Additionally, the recently-started <a href="http://www.openkomodo.com/">OpenKomodo</a> is a new project created by ActiveState to &#8220;[&#8230;] 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 <span class="caps">IDE</span>, to create the Open Komodo code base&#8221;. A new competitor for Eclipse and Netbeans will be available soon?</p>
<p><a href="http://digg.com/programming/A_closer_look_at_Komodo_Edit"><br />
<img src="http://digg.com/img/badges/180x35-digg-button.png" width="180" height="35" alt="Digg!" /><br />
</a></p>