<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Artful Code &#187; textmate</title>
	<atom:link href="http://www.artfulcode.net/tags/textmate/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.artfulcode.net</link>
	<description>Resources and tips for dynamic, interactive languages.</description>
	<lastBuildDate>Fri, 09 Sep 2011 02:15:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>From TextMate to Vim</title>
		<link>http://www.artfulcode.net/articles/from-textmate-to-vim/</link>
		<comments>http://www.artfulcode.net/articles/from-textmate-to-vim/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 15:13:06 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[textmate]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.artfulcode.net/?p=756</guid>
		<description><![CDATA[TextMate is an excellent editor, but it is beginning to show its age. It has a few squeaky wheels that have yet to be oiled, and it looks as though the author may be getting bogged down in the minutiae of his next release. With the next version apparently due sometime after the colonization of Mars, it seemed an auspicious time to try out another editor.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.macromates.com">TextMate</a> is an excellent editor, but it is beginning to show its age. It has a few squeaky wheels that have yet to be oiled, and it looks as though the author may be getting bogged down in the minutiae of his next release. With the <a href="http://blog.macromates.com/2009/working-on-it/">next version</a> apparently due sometime after the colonization of Mars, it seemed an auspicious time to try out another editor.<span id="more-756"></span></p>
<h3>What I like about TextMate</h3>
<p>Let me repeat that I like TextMate. I have happily used it for years. It has some wonderful features. It is reasonably fast and its indentation is great. It has a great selection of plugins for a wide variety of languages and is easy to extend with new language modules. It has a decent macro system based on regular expressions that, while not nearly as powerful as scripted editors, provides 80% of what most users need.</p>
<h3>Problems with TextMate</h3>
<p>TextMate, for all its sterling qualities &#8211; and there are many &#8211; has a few problems that, while not deal-breakers in themselves, together provide a less-than-satisfactory experience.</p>
<h4>Split-windows</h4>
<p>This is a rather stark issue, and is a feature that has been promised in the next release. Nevertheless, its absence often means either filling my screen with open TextMate windows or firing up emacs when I need to look at many files at once &#8211; or many parts of the same file at once. C, in particular, tends toward long functions, and is especially painful to write in TextMate.</p>
<h4>Large files</h4>
<p>TextMate handles many open files well, but a single large file will hang the entire application. I can accept a large file taking a long time to load, but please! Load the file in the background, so that I can keep working. Even opening a large file in a second window blocks the entire application. Find and replace also choke on larger documents, sometimes taking minutes to complete.</p>
<h4>Key-bindings</h4>
<p>TextMate&#8217;s key-bindings can be puzzling. Many common commands (especially in Python), such as converting between spaces and tabs in a document, don&#8217;t have bindings and are several levels deep in the menu. Other commands of dubious utility are given simple bindings, such as &#8220;Execute line/selection inserting result&#8221; (control-R.) Many have extremely difficult combinations, such as control-alt-command-D to toggle to project drawer, or control-option-shift-P to toggle text mode (and then &#8211; because several bundles use this same key-binding, god knows why &#8211; you are given a drop-down to choose which command you wanted.)</p>
<h3>Choosing a new editor</h3>
<p>I was initiated into the cult of emacs in college and have used it for several years. I&#8217;ve played with BBEdit (which I think is horribly cluttered and completely lost in the pre-OSX world), NetBeans, and Eclipse (which is, amazingly, slower and clunkier than NetBeans.) I love emacs&#8217; extensibility and its indentation is second to none. It suffers from the key-binding issue as well, though. Becoming efficient in emacs is a journey, not a destination. I find myself spending more time navigating its arcane and bureaucratic configuration system than actually writing code in it.</p>
<p>NetBeans in some ways seems very polished, and the new Python module is very good (I have <a href="http://www.artfulcode.net/articles/python-in-netbeans/">written about this</a> before.) Refactoring across files is extremely useful. It has good debugger integration. Unfortunately, tight integration with any particular language costs a great deal in load times and can lead to an unresponsive UI. And for god&#8217;s sake &#8211; why does it have to be such a chore to open a file outside of a project?</p>
<p>Panic&#8217;s Coda is pretty and has some neat features, but in the end, SubEthaEdit (its editor) has poor syntax support and its extension system feels very clunky. Editra is nice, but <em>slow</em> and buggy on OSX.</p>
<h3>Vim</h3>
<p>After a disappointing look around the net for better choices, I decided to give Vim another try. I had a passing familiarity with some of its basic functionality from my days as a system administrator, it is scriptable, and it has a large number of plugins for syntax support.</p>
<h4>Lack of distractions</h4>
<p>Overall, I am satisfied with Vim&#8217;s minimalism. Its indentation is pretty second rate, but I can live with it. Vim feels extremely comfortable. Over the years, Vim has gently washed away all of the &#8220;features&#8221; of an editor that actually get in the programmer&#8217;s way and come up with a system that drastically increases productivity and makes coding a more satisfying experience.</p>
<h4>Load speed</h4>
<p>While not the primary measure of an editor, load time is important. How many programmers (myself included) give up on Eclipse or NetBeans right away because it takes more than half a minute to start up? Load time is one of those things that, while really just an annoyance, can completely color the experience of using a program. Vim loads quickly. It is one less thing to get in the way of productivity.</p>
<h4>Efficiency</h4>
<p>Nothing beats Vim for efficiency. If you ever wonder why so many applications have modes that mimic Vim, it is because once you learn Vim&#8217;s bindings, there is nothing faster. Jumping around a file with precision is a breeze. Coming from emacs, I expected it to take a lot longer to become comfortable with Vim&#8217;s style and bindings, but it has a much milder learning curve than emacs. Search and replace is also fast and easy to use. I quickly found myself giving up <a href="http://code.google.com/p/macvim/">MacVim</a> in favor of the command line. Copy and paste &#8211; the biggest barrier to command-line editors for me &#8211; is fast and easy with Vim&#8217;s visual mode.</p>
<h4>Other features</h4>
<p>Vim 7 has auto-complete, although I rarely use it. I&#8217;m much more comfortable with an enormous stack of O&#8217;Reilly books. Vim&#8217;s code folding is also very nice. I generally turn code folding off because it slows most editors down so drastically, but it does not appear to affect Vim.</p>
<p>Two of Vim&#8217;s features really stand out for me: reformatting text and retabbing a document. I love being able to convert a file&#8217;s tabs to spaces just by typing <code>:retab</code>. It is much more efficient than having to go through two levels of menus in TextMate. And being able to reformat Python doc strings is very useful. It removes an annoyance that can make updating documentation a real chore.</p>
<h3>Conclusion</h3>
<p>Vim strikes the perfect balance for me. At first glance, it seems archaic, especially for those born after the mouse became standard. After a few days of using it, though, I find myself enabling Vim bindings mode in any application that has it, using the <a href="https://addons.mozilla.org/en-US/firefox/addon/4891">Vimperator plugin for Firefox</a>, and wishing that OSX&#8217;s terminal was more easily scriptable. If you haven&#8217;t used Vim, give it a chance. Coming from a graphic editor like TextMate, it is a much different experience and, arguably, a more satisfying one.</p>
<p>Here are some other folks&#8217; experiences with the transition in both directions:</p>
<ul>
<li><a href="http://weblog.jamisbuck.org/2008/10/10/coming-home-to-vim">Coming home to Vim</a></li>
<li><a href="http://cosine.org/2007/08/25/vim-textmate/">From Vim to TextMate</a></li>
</ul>
Note: There is a poll embedded within this post, please visit the site to participate in this post's poll.
<p><strong>Edit [2009-08-03 15:50]:</strong> added links to similar stories</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Submit article</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.artfulcode.net%2Farticles%2Ffrom-textmate-to-vim%2F&amp;title=From+TextMate+to+Vim" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.artfulcode.net/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.artfulcode.net%2Farticles%2Ffrom-textmate-to-vim%2F&amp;title=From+TextMate+to+Vim" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.artfulcode.net/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.dzone.com/links/add.html?description=From+TextMate+to+Vim&amp;url=http%3A%2F%2Fwww.artfulcode.net%2Farticles%2Ffrom-textmate-to-vim%2F&amp;title=From+TextMate+to+Vim" rel="nofollow" title="Add to&nbsp;DZone"><img class="social_img" src="http://www.artfulcode.net/wp-content/plugins/social-bookmarks/images/dzone.png" title="Add to&nbsp;DZone" alt="Add to&nbsp;DZone" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fwww.artfulcode.net%2Farticles%2Ffrom-textmate-to-vim%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.artfulcode.net/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.artfulcode.net%2Farticles%2Ffrom-textmate-to-vim%2F&amp;title=From+TextMate+to+Vim" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.artfulcode.net/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.artfulcode.net%2Farticles%2Ffrom-textmate-to-vim%2F&amp;title=From+TextMate+to+Vim" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.artfulcode.net/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.artfulcode.net%2Farticles%2Ffrom-textmate-to-vim%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.artfulcode.net/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+From+TextMate+to+Vim+@+http%3A%2F%2Fwww.artfulcode.net%2Farticles%2Ffrom-textmate-to-vim%2F" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.artfulcode.net/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.artfulcode.net/articles/from-textmate-to-vim/feed/</wfw:commentRss>
		<slash:comments>58</slash:comments>
		</item>
	</channel>
</rss>

