<?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>David Lynch &#187; textmate</title>
	<atom:link href="http://davidlynch.org/blog/tag/textmate/feed/" rel="self" type="application/rss+xml" />
	<link>http://davidlynch.org/blog</link>
	<description>has a blog</description>
	<lastBuildDate>Fri, 18 Jun 2010 07:37:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>AckMate</title>
		<link>http://davidlynch.org/blog/2010/05/ackmate/</link>
		<comments>http://davidlynch.org/blog/2010/05/ackmate/#comments</comments>
		<pubDate>Sat, 22 May 2010 08:10:59 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[ack]]></category>
		<category><![CDATA[ackmate]]></category>
		<category><![CDATA[textmate]]></category>

		<guid isPermaLink="false">http://davidlynch.org/blog/2010/05/ackmate/</guid>
		<description><![CDATA[In the event that anyone was using my TextMate Ack In Project fork, protocool released a successor to Ack In Project called AckMate. It&#8217;s better. Get it instead.]]></description>
			<content:encoded><![CDATA[<p>In the event that anyone was using my TextMate 
<a  href="http://davidlynch.org/blog/2009/02/textmate-bundle-ack-in-project-improved/">Ack In Project fork</a>, protocool released a successor to Ack In Project called 
<a  href="http://github.com/protocool/AckMate">AckMate</a>.</p>
<p>It&#8217;s better. Get it instead.</p>
]]></content:encoded>
			<wfw:commentRss>http://davidlynch.org/blog/2010/05/ackmate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Smart Home in TextMate</title>
		<link>http://davidlynch.org/blog/2009/03/smart-home-in-textmate/</link>
		<comments>http://davidlynch.org/blog/2009/03/smart-home-in-textmate/#comments</comments>
		<pubDate>Sat, 28 Mar 2009 09:59:41 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[bundle]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[textmate]]></category>

		<guid isPermaLink="false">http://davidlynch.org/blog/?p=74</guid>
		<description><![CDATA[I really like &#8220;smart home&#8221; behavior in text editors. That is, I like it when pressing the &#8220;home&#8221; key first moves the cursor to the start of the indented text on that line, and then to the very beginning of the line on a second press. I go out of my way to enable this [...]]]></description>
			<content:encoded><![CDATA[<p>I really like &#8220;smart home&#8221; behavior in text editors. That is, I like it when pressing the &#8220;home&#8221; key first moves the cursor to the start of the indented text on that line, and then to the very beginning of the line on a second press.</p>
<p>I go out of my way to enable this behavior, where possible. For instance, I wrote a 
<a  href="http://github.com/kemayo/gedit-smarthome/tree/master">gedit plugin</a> to get it working properly in gedit, the Gnome text editor.</p>
<p>Unfortunately, TextMate is a harder nut to crack. I worked out the following as a TextMate command, and bound it to command-left:</p>
<pre class="prettyprint"><code>#!/usr/bin/ruby
current_line = ENV['TM_LINE_NUMBER']
current_column  = ENV['TM_LINE_INDEX'].to_i
whitespace_column = /^(\s*)/.match(ENV['TM_CURRENT_LINE'])[1].length + 1

column = if current_column == 0 or current_column &gt; whitespace_column
           whitespace_column
         else
           0
         end

`open "txmt://open?line=#{current_line}&amp;column=#{column}"`</code></pre>
<p>It works, but is far too slow to be usable for me. There&#8217;s a perceptible lag of probably around 100-200ms between hitting the shortcut and the cursor moving.</p>
<p>I think this is an unavoidable limitation of TextMate&#8217;s approach to letting commands navigate within the file. It has to spawn a process to run the command, and the command then spawns a process to run the OSX command <code>open</code> which handles a &#8220;txmt://&#8221; protocol that TextMate has registered with the OS. There&#8217;s some inherent inefficiency there.</p>
<p>(Writing a command with pure shell scripting doesn&#8217;t help, incidentally. It&#8217;s slightly faster, but still not enough to be worth it.)</p>
]]></content:encoded>
			<wfw:commentRss>http://davidlynch.org/blog/2009/03/smart-home-in-textmate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TextMate bundle: Ack in Project (improved)</title>
		<link>http://davidlynch.org/blog/2009/02/textmate-bundle-ack-in-project-improved/</link>
		<comments>http://davidlynch.org/blog/2009/02/textmate-bundle-ack-in-project-improved/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 05:54:46 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[ack]]></category>
		<category><![CDATA[bundle]]></category>
		<category><![CDATA[textmate]]></category>

		<guid isPermaLink="false">http://davidlynch.org/blog/?p=63</guid>
		<description><![CDATA[I use TextMate for work. It&#8217;s a good editor, doesn&#8217;t get in my way, and I take advantage of relatively few of its nifty features. One problem with TextMate is that its built-in search is very slow, especially across a large project. Since I work with a full checkout of the deviantART source code, searches [...]]]></description>
			<content:encoded><![CDATA[<p>I use 
<a  href="http://macromates.com/">TextMate</a> for work.  It&#8217;s a good editor, doesn&#8217;t get in my way, and I take advantage of relatively few of its nifty features.</p>
<p>One <em>problem</em> with TextMate is that its built-in search is very slow, especially across a large project.  Since I work with a full checkout of the deviantART source code, searches can take a while.</p>
<p>So I started using 
<a  href="http://github.com/protocool/ack-tmbundle/tree/master">Ack in Project</a>, a TextMate bundle that uses 
<a  href="http://petdance.com/ack/">ack</a> to search your project.  (Ack is a nifty little tool that combines grep and find, along with a number of useful optimizations for searching checked-out source code.)</p>
<p>However, Ack in Project doesn&#8217;t expose a very useful part of ack&#8217;s functionality, which is the ability to search just particular filetypes.  This has occasionally been a pain &#8212; some words appear commonly in PHP and JS files, but I only care about them in the PHP.</p>
<p>So I spent a little while this evening adjusting Ack in Project to let you choose a file type to search.</p>
<p><img src="http://davidlynch.org/blog/wp-content/uploads/2009/02/picture-9.png" alt="My Ack in Project tweak" title="my-ack-in-project" width="561" height="268" class="size-full wp-image-67" /></p>
<p>My version is up on 
<a  href="http://github.com/kemayo/ack-tmbundle/tree/master">github</a>.</p>
<p>If you&#8217;d like to use it, do this:</p>
<pre><code class="prettyprint">cd ~/Library/Application\ Support/TextMate/Bundles
git clone git://github.com/kemayo/ack-tmbundle.git Ack.tmbundle</code></pre>
<p>(It was my first time messing with tm_dialog, so I&#8217;m not necessarily confident about how I did it. But it works!)</p>
]]></content:encoded>
			<wfw:commentRss>http://davidlynch.org/blog/2009/02/textmate-bundle-ack-in-project-improved/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
