[TxMt] again on quicklook

Allan Odgaard throw-away-2 at macromates.com
Sun Nov 4 09:54:25 UTC 2007


On 2 Nov 2007, at 21:20, Piero D'Ancona wrote:

> I have set most script- and text filetypes to be
> opened with TextMate, and I guess it's the same
> with a lot of fellow textmaters here. Is there a
> simple official way to have these files recognized
> as text type by quicklook, so that we can see the
> content of the file instead of the purple icon?

Based on the file type, there may or may not be a Quick Look plug-in  
to handle it.

The problem you are having is that nothing on your system declares the  
necessary UTI values to make the system know that your file types  
conform to one which can be handled by the Quick Look plug-in for Text.

I would certainly like to add info about all the (source/text) types  
that the system does not already know about, but it is a lot of work.

Also, there are a few considerations:

A UTI is a unique name for the type in the reverse-DNS format, e.g.  
“com.adobe.pdf” for PDF documents. For “common types” though there is  
the public domain, e.g. “public.html”, but only Apple can declare  
types in this domain -- so while “public.latex” would probably be more  
appropriate than “org.latex-project.latex” (or whoever is in control  
of this “file type”), I am not sure if we should violate this rule  
about not putting stuff in the public domain.

The next problem is more practical. A UTI conforms to one or more  
other types, e.g. “public.c” conforms to “public.source-code”, this in  
turn conforms to “public.plain-text” which conforms to “public.text”.

Basically “public.text” is all text, and “public.plain-text” is text  
without markup, so “public.html” would conform to “public.text” and  
*not* to “public.plain-text”.

Okay, so the problem here is that if we introduce “org.latex- 
project.latex” for LaTeX, that should conform to “public.text”, since  
the text contains markup, but the Quick Look plug-in for text will  
only handle “public.plain-text”, so if we were to add an IMO “correct”  
entry for LaTeX, you actually still would not get the preview.

I didn’t actually verify this, just checked the Info.plist of /System/ 
Library/Frameworks/QuickLook.framework/Resources/Generators/ 
Text.qlgenerator.




More information about the textmate mailing list