<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><language>en-us</language><copyright>Copyright 2006</copyright><managingEditor>palrich@gmail.com</managingEditor><webMaster>palrich@gmail.com</webMaster><lastBuildDate>Tue, 07 Sep 2010 14:38:47 +0000</lastBuildDate><pubDate>Tue, 07 Sep 2010 14:38:47 +0000</pubDate><ttl>60</ttl><generator>WeirdLooking.com</generator><link>http://www.weirdlooking.com/</link><description>WeirdLooking.com: Michael Barton's Blog</description><title>WeirdLooking.com: Michael Barton's Blog</title><image><url>http://www.weirdlooking.com/images/feed.png</url><title>WeirdLooking.com: Michael Barton's Blog</title><link>http://www.weirdlooking.com/</link></image><item><title>Abbreviation expansion in Komodo Edit</title><dc:creator>Michael Barton</dc:creator><link>http://www.weirdlooking.com/blog/abbreviation-expansion-in-komodo-edit</link><guid>http://www.weirdlooking.com/blog/abbreviation-expansion-in-komodo-edit</guid><pubDate>Sun, 11 Nov 2007 19:06:06 +0000</pubDate><description>So, I&amp;rsquo;ve been pretty jealous of TextMate lately.&amp;nbsp; I really can&amp;rsquo;t see spending $2,000 for a text editor (including the Mac), though.&amp;nbsp; This morning, I hacked up an &lt;a href=&quot;http://www.weirdlooking.com/blog/92/abbr.kpf&quot; style=&quot;position: relative; padding-left: 8px; zoom: 1;&quot;&gt;&lt;span style=&quot;position: absolute; top: -5px; left: 0px; width: 16px; height: 16px; background: URL(http://www.weirdlooking.com/exticon?http%3A%2F%2Fwww.weirdlooking.com%2Fblog%2F92%2Fabbr.kpf) no-repeat center center; -moz-opacity: 0.3; opacity: 0.3; filter:alpha(opacity=30);&quot;&gt;&lt;/span&gt;attempt&lt;/a&gt; at TextMate-style abbreviation expansion in Komodo Edit, using a javascript macro.&lt;br /&gt;&lt;br /&gt;Unlike &lt;a href=&quot;http://community.activestate.com/forum-topic/trigger-now-tabstop-support&quot; style=&quot;position: relative; padding-left: 8px; zoom: 1;&quot;&gt;&lt;span style=&quot;position: absolute; top: -5px; left: 0px; width: 16px; height: 16px; background: URL(http://www.weirdlooking.com/exticon?http%3A%2F%2Fcommunity.activestate.com%2Fforum-topic%2Ftrigger-now-tabstop-support) no-repeat center center; -moz-opacity: 0.3; opacity: 0.3; filter:alpha(opacity=30);&quot;&gt;&lt;/span&gt;other versions&lt;/a&gt; I&amp;rsquo;ve found, it doesn&amp;rsquo;t rely on the editor&amp;rsquo;s built-in word selection.&amp;nbsp; Instead, it grabs the text of the current line up to the cursor position and runs it through a regular expression.&amp;nbsp; There are several consequences to this:&amp;nbsp; It can be assigned to the tab key, since the regex eats whitespace.&amp;nbsp; I was also able to add generic HTML tag expansion, so that &amp;ldquo;&amp;lt;h1[TAB]&amp;rdquo; expands to &amp;ldquo;&amp;lt;h1&amp;gt;&amp;lt;/h1&amp;gt;&amp;rdquo;, with the cursor set between them.&amp;nbsp; I&amp;rsquo;m not sure if TextMate does this, but it probably should.&lt;br /&gt;&lt;br /&gt;It also makes use of subfolders for different programming languages.&amp;nbsp; If two subfolders contain snippets with the same name, it&amp;rsquo;ll preferentially select the subfolder with the same name as the language of the current document.&lt;br /&gt;&lt;br /&gt;TextMate can do some cool stuff Komodo can&amp;rsquo;t, like intelligently tabbing through different parts of a snippet that need customization.&amp;nbsp; I can&amp;rsquo;t see any way to do that in Komodo without making it a terrible hack (like inserting &amp;ldquo;TODO&amp;rdquo; wherever focus is needed, then tabbing to the next &amp;ldquo;TODO&amp;rdquo;).&lt;br /&gt;&lt;br /&gt;Anyway, I&amp;rsquo;m fairly happy with it as is.&amp;nbsp; Now I just need to figure out how to generate code intelligence settings for our codebase at work.</description><category>komodo</category><category>abbreviations</category><category>textmate</category><comments>http://www.weirdlooking.com/blog/abbreviation-expansion-in-komodo-edit#comments</comments><wfw:comment>http://www.weirdlooking.com/comments/92</wfw:comment><wfw:commentRss>http://www.weirdlooking.com/rss/comments/92</wfw:commentRss><slash:comments>0</slash:comments></item></channel></rss>