<?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"
	>

<channel>
	<title>TextMate Blog</title>
	<atom:link href="http://blog.macromates.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.macromates.com</link>
	<description>TextMate and OS X</description>
	<pubDate>Mon, 28 Apr 2008 12:22:05 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>TextMate (Ruby) Tricks</title>
		<link>http://blog.macromates.com/2008/textmate-ruby-tricks/</link>
		<comments>http://blog.macromates.com/2008/textmate-ruby-tricks/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 12:22:05 +0000</pubDate>
		<dc:creator>Allan Odgaard</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blog.macromates.com/2008/textmate-ruby-tricks/</guid>
		<description><![CDATA[John Muchow of Mac Developer Tips recently posted a screencast showing a neat way to debug your Ruby code.

Speaking of the Ruby bundle, Ciarán Walsh has a post about the design philosophy behind the mnemonics of the Ruby bundle and a few highlights.

And while there seems to be a preference for writing TextMate commands in [...]]]></description>
			<content:encoded><![CDATA[<p>John Muchow of <a href="http://macdevelopertips.com/">Mac Developer Tips</a> recently posted a screencast showing a <a href="http://macdevelopertips.com/textmate/textmate-execute-inline-ruby.html">neat way to debug your Ruby code</a>.</p>

<p>Speaking of the Ruby bundle, Ciarán Walsh has a post about the <a href="http://ciaranwal.sh/2008/02/20/textmate-tip-the-ruby-bundle">design philosophy behind the mnemonics of the Ruby bundle</a> and a few highlights.</p>

<p>And while there seems to be a preference for writing TextMate commands in Ruby, anything that you can run from a terminal (shell) can be used. A <a href="http://ciaranwal.sh/2008/04/04/textmate-tip-using-php-for-commands">step-by-step tutorial about how to write TextMate commands in PHP</a> is available at Ciarán’s blog. I pushed him to write this one, as I believe there are a lot of people who work with PHP in TextMate that never got around to writing custom commands in the false belief that they would have to learn <a href="http://en.wikipedia.org/wiki/Elisp">elisp</a> or some similarly obscure language :)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.macromates.com/2008/textmate-ruby-tricks/feed/</wfw:commentRss>
		</item>
		<item>
		<title>ExpanDrive — Seamless sftp mounts</title>
		<link>http://blog.macromates.com/2008/expandrive-seamless-sftp-mounts/</link>
		<comments>http://blog.macromates.com/2008/expandrive-seamless-sftp-mounts/#comments</comments>
		<pubDate>Tue, 04 Mar 2008 12:51:45 +0000</pubDate>
		<dc:creator>Allan Odgaard</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blog.macromates.com/2008/expandrive-seamless-sftp-mounts/</guid>
		<description><![CDATA[Not so long ago Jonathan Ragan-Kelley mentioned ExpanDrive on the mailing list and I assume it is the same Jonathan R. quoted on their page as saying:


  I’ve never seen TextMate work well on a network drive. With
  ExpanDrive, it’s a dream. And the drives stay mounted perfectly
  when I move my [...]]]></description>
			<content:encoded><![CDATA[<p>Not so long ago Jonathan Ragan-Kelley <a href="http://lists.macromates.com/pipermail/textmate/2008-February/024516.html">mentioned ExpanDrive on the mailing list</a> and I assume it is the same Jonathan R. quoted on <a href="http://www.magnetk.com/expandrive" title="ExpanDrive — Mount sftp onto your desktop (OS X)">their page</a> as saying:</p>

<blockquote>
  <p>I’ve never seen TextMate work well on a network drive. With
  ExpanDrive, it’s a dream. And the drives stay mounted perfectly
  when I move my laptop between home and work.</p>
</blockquote>

<p>John Gruber just posted a <a href="http://daringfireball.net/2008/03/expandrive">review about ExpanDrive</a> in which he writes:</p>

<blockquote>
  <p>My first impression after reading ExpanDrive’s promotional
  description last week was that it sounded too good to be true. One
  week later, I’m pretty sure it actually <em>is</em> that good.</p>
</blockquote>

<p>If it wasn’t clear from the above, <a href="http://www.magnetk.com/expandrive" title="ExpanDrive — Mount sftp onto your desktop (OS X)">ExpanDrive</a> lets you mount remote sftp drives and it actually works! I.e. no long delays or dropped connection in the middle of a save. Their introductory price is $29.</p>

<p><strong>2008-03-11: Update:</strong> There is a $5 discount for the first 100 who use <code>UWQ0OUQZWIB1ZMTP</code> as coupon code.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.macromates.com/2008/expandrive-seamless-sftp-mounts/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Changes — FileMerge Replacement</title>
		<link>http://blog.macromates.com/2008/changes-filemerge-replacement/</link>
		<comments>http://blog.macromates.com/2008/changes-filemerge-replacement/#comments</comments>
		<pubDate>Fri, 29 Feb 2008 06:31:06 +0000</pubDate>
		<dc:creator>Allan Odgaard</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blog.macromates.com/2008/changes-%e2%80%94-filemerge-replacement/</guid>
		<description><![CDATA[

Ian Baird recently released Changes which is an application to show differences between two folders and merge these intelligently.

I know this is not an uncommon task among many TextMate users, as I have received quite a lot of requests for building such functionality — Changes of course has TextMate integration, so this application will hopefully [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.macromates.com/wp-content/uploads/2008/02/changes-icon.png" alt="Changes Application Icon" height="128" width="128" align="right"></p>

<p>Ian Baird recently released <a href="http://changesapp.com/">Changes</a> which is an application to show differences between two folders and merge these intelligently.</p>

<p>I know this is not an uncommon task among many TextMate users, as I have received quite a lot of requests for building such functionality — Changes of course has TextMate integration, so this application will hopefully satisfy a lot of you.</p>

<p>Version 1.0 of Changes is available for $39.95 (free trial) but if you use <code>TEXTMATE0308</code> as coupon code you can get it for $29.95 (offer lasts throughout March 2008).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.macromates.com/2008/changes-filemerge-replacement/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Git Bundle</title>
		<link>http://blog.macromates.com/2008/git-bundle/</link>
		<comments>http://blog.macromates.com/2008/git-bundle/#comments</comments>
		<pubDate>Wed, 20 Feb 2008 23:46:34 +0000</pubDate>
		<dc:creator>Allan Odgaard</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blog.macromates.com/2008/git-bundle/</guid>
		<description><![CDATA[You may have read that a lot of prominent people have recently moved to Git and are loving it. I too am one of those who fancy this new kid on the block but never got very far with the bundle I started for it.

Fortunately Tim Harper recently picked up on my initial efforts and [...]]]></description>
			<content:encoded><![CDATA[<p>You may have read that a lot of prominent people have recently moved to Git and are loving it. I too am one of those who fancy this new kid on the block but never got very far with the bundle I started for it.</p>

<p>Fortunately Tim Harper recently picked up on my initial efforts and has done a great job at not only making this bundle functional but also downright impressive :)</p>

<p>The much improved <a href="http://gitorious.org/projects/git-tmbundle">Git bundle can be found at Gitorious</a> and discussion about it can be directed to its <a href="http://groups.google.com/group/git-tmbundle" title="Git Bundle Google Group">Google Group</a>.</p>

<p>For those too lazy to click the link above, here are the short install instructions:</p>

<pre><code>mkdir -p /Library/Application\ Support/TextMate/Bundles
cd !$
git clone git://gitorious.org/git-tmbundle/mainline.git Git.tmbundle
osascript -e 'tell app "TextMate" to reload bundles'
</code></pre>

<p>After having installed it you can press <abbr title="Control-Command-T">⌃⌘T</abbr> in TextMate and enter <code>git</code> to find the <em>“Administration → Update Git Bundle”</em> action. Use this to update the bundle (it will automatically reload after having performed the update).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.macromates.com/2008/git-bundle/feed/</wfw:commentRss>
		</item>
		<item>
		<title>From Bash to Z Shell</title>
		<link>http://blog.macromates.com/2008/from-bash-to-z-shell/</link>
		<comments>http://blog.macromates.com/2008/from-bash-to-z-shell/#comments</comments>
		<pubDate>Tue, 12 Feb 2008 00:05:57 +0000</pubDate>
		<dc:creator>Allan Odgaard</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blog.macromates.com/2008/from-bash-to-z-shell/</guid>
		<description><![CDATA[

If your usage of Mac OS X is the slightest bit “technical” then you should do yourself the favor of getting familiar with the extremely powerful shell environment.

Even if you already know a dozen scripting languages far more expressive than the shell, there are still contexts in which the shell is just better suited for [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.macromates.com/wp-content/uploads/2008/02/from-bash-to-z-shell-book-cover.jpg" alt="From Bash to Z Shell Book Cover" height="110" width="83" align="right"></p>

<p>If your usage of Mac OS X is the slightest bit “technical” then you should do yourself the favor of getting familiar with the extremely powerful shell environment.</p>

<p>Even if you already know a dozen scripting languages far more expressive than the shell, there are still contexts in which the shell is just better suited for the job, and understanding the POSIX environment is knowledge that is very valuable even outside the shell.</p>

<p><a href="http://blog.grayproductions.net/">James Edward Gray</a> has a <a href="http://blog.grayproductions.net/articles/from_bash_to_z_shell">review of <em>From Bash to Z Shell</em></a> which sounds like just the book you want to pick up, quoting from his review:</p>

<blockquote>
  <p>I&#8217;ve already noticed dramatic differences. I&#8217;m using shell loops at the command-line now to process many files at once; I actually understand shell quoting and when to use which types of quotes and escapes to get the desired effect; I can easily strip off a file extension or get a directory name from a full path when I need one; I make constant use of the command history now whether I&#8217;m searching for a past command, correcting a typo, or just pulling a single argument out of a previous command for reuse in a new command; and I&#8217;ve written a few shell functions to provide shortcuts to my common tasks.</p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.macromates.com/2008/from-bash-to-z-shell/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Eye on TextMate Bundles</title>
		<link>http://blog.macromates.com/2007/eye-on-textmate-bundles/</link>
		<comments>http://blog.macromates.com/2007/eye-on-textmate-bundles/#comments</comments>
		<pubDate>Fri, 07 Dec 2007 07:59:53 +0000</pubDate>
		<dc:creator>Allan Odgaard</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blog.macromates.com/2007/eye-on-textmate-bundles/</guid>
		<description><![CDATA[Luke Daley took initiative to have FishEye index the TextMate Bundles repository.

A neat thing about FishEye (in addition to the “lines of code”-graph shown below) is that it allows per-folder RSS feeds.





We have always offered a repository-wide RSS feed but if you only want to follow changes done to the LaTeX bundle then you can [...]]]></description>
			<content:encoded><![CDATA[<p>Luke Daley took initiative to have <a href="http://fisheye2.cenqua.com/browse/textmate-bundles/trunk/">FishEye index the TextMate Bundles repository</a>.</p>

<p>A neat thing about FishEye (in addition to the “lines of code”-graph shown below) is that it allows per-folder RSS feeds.</p>

<p><img src="http://fisheye2.cenqua.com/browse/textmate-bundles/trunk?linegraph" alt="Lines of code over time for the TextMate bundles" width="300" height="220"></p>

<p><span id="more-181"></span></p>

<p>We have always offered a <a href="http://macromates.com/svnlog/bundles.rss">repository-wide RSS feed</a> but if you only want to follow <a href="http://fisheye2.cenqua.com/browse/textmate-bundles/trunk/Bundles/Latex.tmbundle">changes done to the LaTeX bundle</a> then you can subscribe to just that. Go to the <a href="http://fisheye2.cenqua.com/browse/textmate-bundles/trunk/Bundles/">TextMate Bundles listing</a> and click the bundle you are interested in to see the history of that bundle. In the “Recent Changelog” box (to the left) is an RSS link in the upper right corner.</p>

<p>On the topic of data mining the TextMate bundles repository, <a href="http://www.ohloh.net/projects/9884?p=Macromates+TextMate+Bundles">ohloh.net estimates that it costs more than a million dollars to hire a team to create the code in the repository</a> (and their KLOC count seems to be only one fifth of what FishEye finds).</p>

<p>Another service we have been using to <a href="http://cia.vc/stats/project/TextMateBundles">keep track of our commits</a> is CIA.vc. This was motivated by their useful IRC bot that used to echo the commits to the <a href="irc://irc.freenode.net/##textmate">#textmate IRC channel</a> (their service has been having some problems lately).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.macromates.com/2007/eye-on-textmate-bundles/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Right-Aligned Snippet Placeholders</title>
		<link>http://blog.macromates.com/2007/right-aligned-snippet-placeholders/</link>
		<comments>http://blog.macromates.com/2007/right-aligned-snippet-placeholders/#comments</comments>
		<pubDate>Tue, 04 Dec 2007 06:13:47 +0000</pubDate>
		<dc:creator>Allan Odgaard</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blog.macromates.com/2007/right-aligned-snippet-placeholders/</guid>
		<description><![CDATA[The other day Abhi Beckert asked (on IRC) how to ensure right-aligned text in a snippet. That is, after the snippet has been first inserted, it reads:

# --------------------
#               Header
# --------------------


Here Header is a placeholder which we can overtype. When we fill [...]]]></description>
			<content:encoded><![CDATA[<p>The other day Abhi Beckert asked (on IRC) how to ensure right-aligned text in a snippet. That is, after the snippet has been first inserted, it reads:</p>

<pre><code># --------------------
#               Header
# --------------------
</code></pre>

<p>Here <code>Header</code> is a placeholder which we can overtype. When we fill in the actual header name (for example <code>Configuration</code>) the text should be formatted like:</p>

<pre><code># --------------------
#        Configuration
# --------------------
</code></pre>

<p>The trick to solving this problem is by using <a href="http://macromates.com/textmate/manual/regular_expressions#conditional_insertions">conditional insertions</a> in the replacement string.</p>

<p><span id="more-180"></span></p>

<p>First let’s briefly summarize snippet placeholders and mirrors.</p>

<p>If we do a snippet like this:</p>

<pre><code># --------------------
# ${1:Header}
# --------------------
</code></pre>

<p>We use just a placeholder, that is, we can overtype the <code>Header</code> string after having inserted the snippet.</p>

<p>A mirror is using <code>$1</code> some other place in the snippet. This will then mirror what we type. We can run a replacement on this mirror to make it more interesting, for example we can replace each character with a dash, and use that technique to have the dashed lines above/below the text line match in length, for example by doing:</p>

<pre><code># ${1/./-/g}
# ${1:Header}
# ${1/./-/g}
</code></pre>

<p>Getting back to right-alignment. Here what we want to do is similar to the above. I.e. we want to insert spaces based on what is entered in the placeholder.</p>

<p>But with the construction of the dashed lines, we want one dash for each letter entered, and so we can use a simple replacement. In the case of right-alignment, we actually want one space for each letter <strong>not</strong> typed.</p>

<p>So to get started, here is the outline of what we want:</p>

<pre><code># --------------------
# ${1/…/…/}${1:Header}
# --------------------
</code></pre>

<p>The <code>${1/…/…/}</code> is the interesting bit. If the user types zero characters, we want it to output 20 spaces. If the user types 1 character, we want 19 spaces, etc.</p>

<p>So while the result of the transformation is dependent on text entered, there isn’t the simple 1:1 relationship which we could exploit for the dashed lines.</p>

<p>This is where conditional insertions are useful. What they allow you to do is optionally match something, and based on whether or not something was actually matched, insert something in the replacement.</p>

<p>This works by testing capture registers, that is, if our search is for <code>(foo)?</code> then capture register 1 can be tested for whether or not we matched <code>foo</code>. Testing this is done by using <code>(?1:bar)</code> in the replacement string. Here we insert <code>bar</code> only when capture register 1 captured something. We can also have text inserted if it did not match, this is done using <code>(?1:bar:baz)</code>, now <code>bar</code> is inserted if we matched <code>foo</code>, otherwise <code>baz</code> is inserted.</p>

<p>We concluded above that for each character not matched, we want to insert a space. So conceptually we try to match 20 characters, using a capture register for each of them, and for those not matched, we insert a space.</p>

<p>In this example I will only try to match 5 letters, as the pattern should be clear from that:</p>

<pre><code>^(.)?(.)?(.)?(.)?(.)?.*$
</code></pre>

<p>If the string is <code>foo</code> we have capture register 1-3 filled and 4-5 empty, and we want to insert a space for those last two.</p>

<p>So our replacement becomes:</p>

<pre><code>(?1:: )(?2:: )(?3:: )(?4:: )(?5:: )
</code></pre>

<p>So for each capture register (1-5) insert nothing if there is a match, otherwise insert a space.</p>

<p>Writing this out for a 20 character wide field might be tedious, so we can instead do a command with output set to <em>“Insert as Snippet”</em> which would use code similar to the following to generate the mirror and placeholder:</p>

<pre><code>width = 20

print "${1/^" + "(.)?"*width + ".*$/"
1.upto(width) { |i| print "(?#{i}:: )" }
print "/}${1:Header}" + "\n"
</code></pre>

<p>You can also pre-generate the snippet, but a command makes it easy to later tweak the field lengths.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.macromates.com/2007/right-aligned-snippet-placeholders/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Logitech Control Center</title>
		<link>http://blog.macromates.com/2007/logitech-control-center/</link>
		<comments>http://blog.macromates.com/2007/logitech-control-center/#comments</comments>
		<pubDate>Thu, 29 Nov 2007 22:14:29 +0000</pubDate>
		<dc:creator>Allan Odgaard</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blog.macromates.com/2007/logitech-control-center/</guid>
		<description><![CDATA[

Seems the infamous Logitech Control Center is back to wreak havoc.

They released a 2.4 update on the 20th of November and a week later a “mate error” thread surfaced on the mailing list, I have received a dozen support emails about the problem, and if you look at the comments for LCC at VersionTracker or [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.macromates.com/wp-content/uploads/2007/11/logitech-control-center-icon.png" alt="Logitech Control Center Icon" height="128" width="128" align="right"></p>

<p>Seems the <a href="http://daringfireball.net/2007/10/blue_in_the_face">infamous Logitech Control Center</a> is back to wreak havoc.</p>

<p>They released a 2.4 update on the 20th of November and a week later a <a href="http://lists.macromates.com/pipermail/textmate/2007-November/thread.html#23481">“mate error” thread</a> surfaced on the mailing list, I have received a dozen support emails about the problem, and if you look at the comments for LCC at <a href="http://www.versiontracker.com/dyn/moreinfo/macosx/14421&amp;mode=feedback">VersionTracker</a> or <a href="http://www.macupdate.com/reviews.php?id=8154">MacUpdate</a>, you’ll find that a lot of users are reporting problems with this update.</p>

<p>So my advice: uninstall LCC. And on a more general note, if something has worked fine for a year, and it suddenly breaks, consider what you did to alter your system in the last week before you write support, thanks! :)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.macromates.com/2007/logitech-control-center/feed/</wfw:commentRss>
		</item>
		<item>
		<title>TextMate Tips</title>
		<link>http://blog.macromates.com/2007/textmate-tips/</link>
		<comments>http://blog.macromates.com/2007/textmate-tips/#comments</comments>
		<pubDate>Thu, 15 Nov 2007 09:40:54 +0000</pubDate>
		<dc:creator>Allan Odgaard</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blog.macromates.com/2007/textmate-tips/</guid>
		<description><![CDATA[I indirectly plugged Ciarán Walsh’s blog in a previous post about hacking TextMate. Though it is worth mentioning it again, especially the TextMate tips category.

Ale Muñoz (maintainer of the ActionScript bundle) runs a blog that has a Flash / ActionScript / TextMate focus, I haven’t linked to it before, so I hereby am making up [...]]]></description>
			<content:encoded><![CDATA[<p>I indirectly plugged <a href="http://ciaranwal.sh/">Ciarán Walsh’s blog</a> in a <a href="http://blog.macromates.com/2007/hacking-textmate/">previous post about hacking TextMate</a>. Though it is worth mentioning it again, especially the <a href="http://ciaranwal.sh/category/tips">TextMate tips category</a>.</p>

<p>Ale Muñoz (maintainer of the ActionScript bundle) runs a <a href="http://bomberstudios.com/">blog that has a Flash / ActionScript / TextMate focus</a>, I haven’t linked to it before, so I hereby am making up for that.</p>

<p>Lastly let me send some link love to Thomas Aylott’s projects: <a href="http://subtleGradient.com/">his blog</a>, post about his <a href="http://lists.macromates.com/pipermail/textmate/2007-August/021492.html">Leopard theme for TextMate</a>, and <a href="http://bundleforge.com/">BundleForge</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.macromates.com/2007/textmate-tips/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Leopard Issues</title>
		<link>http://blog.macromates.com/2007/leopard-issues/</link>
		<comments>http://blog.macromates.com/2007/leopard-issues/#comments</comments>
		<pubDate>Sun, 11 Nov 2007 21:06:52 +0000</pubDate>
		<dc:creator>Allan Odgaard</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[]]></category>

		<guid isPermaLink="false">http://blog.macromates.com/2007/leopard-issues/</guid>
		<description><![CDATA[This post is meant to clarify a few Leopard related issues.



Quick Look

Quick Look is the technology which allows you to preview your files in the Finder. Some assume that because they see a TextMate document icon for a file type, it is TextMate’s responsibility to “make it work” for that file type, so let me [...]]]></description>
			<content:encoded><![CDATA[<p>This post is meant to clarify a few Leopard related issues.</p>

<p><span id="more-177"></span></p>

<h1>Quick Look</h1>

<p><a href="http://www.apple.com/macosx/features/quicklook.html">Quick Look</a> is the technology which allows you to preview your files in the Finder. Some assume that because they see a TextMate document icon for a file type, it is TextMate’s responsibility to “make it work” for that file type, so let me clarify.</p>

<p>The way the system works is by having Quick Look generators be able to generate the preview for a specific file type. By default there is such a generator for Text, more specifically <code>public.plain-text</code>.</p>

<p>The reason this is not used for <em>«your file type»</em> is that the system does not know that <em>«your file type»</em> conforms to <code>public.plain-text</code>.</p>

<p>The way the system learns about file types is by looking in the <code>Info.plist</code> of the installed applications. So ideally TextMate would contain info to educate the system about the file types you use with TextMate. Adam R. Maxwell posted a <a href="http://lists.macromates.com/pipermail/textmate/2007-November/023136.html">small utility to update TextMate’s <code>Info.plist</code></a> with the document types assigned to TextMate (and declare them <code>public.plain-text</code>). There is also a MacOSX hint about <a href="http://www.macosxhints.com/article.php?story=20071028184428583">updating TeXShop to contain UTI info about LaTeX</a>.</p>

<p>Naturally it should not fall upon the user to manage all the type information. The reason that I haven’t added <a href="http://developer.apple.com/macosx/uniformtypeidentifiers.html">UTI</a> info to TextMate yet is twofold, 1) it is a major cataloging work adding proper type info for all the types TextMate currently claims to support (there are more than 100 different extensions in the current <code>Info.plist</code>) and 2) the proper type info means having markup languages conform to <code>public.text</code> <strong>not</strong> <code>public.plain-text</code>, and so, would actually not be handled by the Quick Look generator for Text (I wrote a <a href="http://lists.macromates.com/pipermail/textmate/2007-November/023108.html">longer post about this</a>).</p>

<h1>Spaces</h1>

<p>I have received a lot of bug reports related to how windows act in Spaces, how they can or cannot be moved between spaces, etc. Generally though this is outside the domain of a user application and bug/enhancement reports should be entered into <a href="https://bugreport.apple.com/">Apple’s Bug Tracker</a>.</p>

<p>There is one item which might be up for debate, namely that re-opening a window (like the Find window) opens in the last space where that window was used. Now again, the concept of spaces is unknown to user applications, so there is no way TextMate can explicitly tell the system which space that window should open in.</p>

<p><strong>Update:</strong> <em>Joe Ranieri informs me that there actually is API for this. An update will be out soon where the Find window does follow the active space</em>.</p>

<p><strike>The reason e.g. TextEdit does not show the same problem (for the Find window) is that TextEdit will re-create the window when it is needed, and creating a new window will have it open in the current space, where re-opening a window, has it stick to the space where it was last open in. That is, unless the window is a utility window, as Thomas Aylott explains in his tip on <a href="http://subtleGradient.com/articles/2007/10/27/fix-safari-downloads-window-on-leopard-spaces">how to make Safari’s download window follow the active space</a>.</strike></p>

<p><strike>You could argue that TextMate thus should re-create rather than re-use its Find window to be a better fit for the current semantics of Spaces, but for now I am waiting to see if Apple doesn’t change this behavior, since following the active space is really what you want for all windows, and switching to re-creating windows, rather than re-opening, is not flipping a switch, since you generally want to preserve the state of the window when re-opening it, e.g. open Preferences, switch to the non-default page, give focus to some control, now close and re-open the window, if the application was to dispose and re-create the window, this state would be lost (and <a href="http://developer.apple.com/documentation/UserExperience/Conceptual/OSXHIGuidelines/XHIGWindows/chapter_17_section_4.html#//apple_ref/doc/uid/20000961-TPXREF21">AHIG says it should be kept</a>).</strike></p>

<h1>Detached Drawer</h1>

<p>After the release of Leopard I had a handful of reports of a <a href="http://www.yiqiang.org/tm_drawer_bug.png">detached drawer</a>. Florian Gilcher though says <a href="http://lists.macromates.com/pipermail/textmate/2007-November/023180.html">he also saw this on Tiger</a> and mentions that it is likely to happen in relation to switching monitor setup, so it might just have been a fluke, that the number of reported incidents rose, or it might be, that this problem is more prevalent on Leopard.</p>

<p>There has previously been <a href="http://lists.macromates.com/pipermail/textmate/2007-June/020625.html">reported problems related to switching monitor setup</a> (i.e. going from two → one attached monitor) and window behavior.</p>

<p>Like with Spaces, for regular applications that do not mess with low-level window stuff, these problems are rarely caused by the application itself.</p>

<h1>The <code>mate</code> Shell Command</h1>

<p>Two problems commonly reported after upgrading to Leopard are:</p>

<ol>
<li><p><em>I lost the <code>mate</code> shell command, how do I get it back?</em></p>

<p>The answer here is to select <em>Terminal Usage…</em> from the <em>Help</em> menu.</p></li>
<li><p><em>I get this error: <code>mate: failed to establish connection with TextMate.</code></em></p>

<p>The shell command uses <a href="http://developer.apple.com/documentation/Cocoa/Conceptual/DistrObjects/DistrObjects.html">Distributed Objects</a> to talk with TextMate. For reasons unknown to me, Leopard’s version of <code>screen</code> makes clients unable to connect to the server. <a href="http://lists.macromates.com/pipermail/textmate/2007-October/022967.html">Andre Arko found</a> that if you install <code>screen</code> from MacPorts, the problem goes away.</p></li>
</ol>

<h1>Key Bindings</h1>

<h2>Page Up/Down Weirdness</h2>

<p>A couple of users reported that page up/down behaved really weird. The solution was to delete <code>~/Library/Preferences/.GlobalPreferences.plist</code>. This file holds a minimal number of global settings, you can open the file in TextMate and press <abbr title="Control-Shift-H">⌃⇧H</abbr> to inspect these before you zap the file.</p>

<h2>No Gear Menu on Control-Escape (<abbr title="Control-Escape">⌃⎋</abbr>)</h2>

<p>This is caused by having enabled <em>Screen Sharing</em> or <em>Remote Management</em> in System Preferences → Sharing. This was also a problem under Tiger (with Apple Remote Desktop), but now that ARD is built-in, it is more prevalent. I am not sure why ARD needs to intercept this key combination.</p>

<p>Speaking of the gear menu, the items with tab triggers are using a larger font than regular items — I am aware of this, but haven’t looked into it yet.</p>

<h2><code>KeyBindings.dict</code> Entries not Working</h2>

<p>When you press a key the generated event is first passed to the menu system and then later the control with focus (i.e. the text editing area in TextMate). It is the latter which resolve keys based on your custom key bindings, where the former will resolve keys based on the key equivalents given to the menu items.</p>

<p>In Tiger the menu system would only resolve key equivalents for menu items with the <abbr title="Command">⌘</abbr> modifier. In Leopard it also handles those without this modifier, so if you have bound <abbr title="Control-T">⌃T</abbr> to some action in your key bindings file, in Tiger that action would be executed, but in Leopard the menu system will see that Text → Convert → Transpose has <abbr title="Control-T">⌃T</abbr> as key equivalent and so will execute that menu item.</p>

<p>To work around this you need to assign another key equivalent (using System Preferences → Keyboard &amp; Mouse) to the menu item which eclipse your custom key binding.</p>

<h1>Font Issues</h1>

<p>In the past when people experienced broken rendering the tip was to reset the font cache. With Leopard this is <a href="http://www.macosxhints.com/article.php?story=20071026081555971">slightly more involved</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.macromates.com/2007/leopard-issues/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
