[TxMt] Re: leopard quick look on TextMate text documents

Chris Poirier cpoirier at gmail.com
Thu Nov 1 14:24:06 UTC 2007

Hi Jasper,

> When I do a quick look on a TextMate text document, I just see a big
> TextMate icon and not the content. Does anyone have an idea how that could
> be fixed? Is it a Mac OS problem for not showing the content of a text file
> or is the OS simply asking the app (TextMate) how the document should be
> shown somehow?

I was able to hack together something that works on my machine, based
on the comments here and some docs at Apple:
http://developer.apple.com/macosx/uniformtypeidentifiers.html.  Note
that there are probably *WAY* more intelligent ways to do this, and if
you implement what I suggest here you are doing so AT YOUR OWN RISK.

Now, with that out of the way, I just created an empty application
(from the shell) with a hacked Info.plist, as follows:


In Info.plist I put the following:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
<plist version="1.0">




The important stuff in there is the UTType stuff.  Just adjust/copy
that "dict" section with fake data about the file type you want to use
with QuickLook.  As long as UTTypeConformsTo is public.plain-text,
QuickLook will display it as text.

And if someone else knows how to do this properly, please let me know.  :-)


More information about the textmate mailing list