Closed GoogleCodeExporter closed 9 years ago
Oh my! I added a whole bunch of bogus UTIs just so that Quick Look would work
for files associated with
MacVim. It didn't cross my mind that I'd break other programs in the process.
My apologies.
I'll fix the markdown UTI and I'll have to ponder what to do about the
remaining bogus UTIs.
Thanks for telling me about this problem!
Original comment by bjorn.winckler@gmail.com
on 29 Sep 2009 at 7:26
Dump me a list and I'll do the research for you. Yes, that's the kind of guy I
am. :)
This is just the beginning of UTI hell, Bjorn. There is no central authority
on these things, the
~/Library/QuickLook does not override /System/Library/QuickLook, and creator
codes are gone in Snow
Leopard. I'd rather put some work in than find myself under a heap of
conflicting app's UTIs.
Original comment by ycherkashin
on 29 Sep 2009 at 7:30
The complete list of UTIs is pasted below (taken from MacVim's Info.plist).
I'd be very grateful if you'd help
me finding the proper UTIs!
org.vim.vim-file
org.vim.text-file
org.vim.tex-file
org.vim.h-file
org.vim.pch-file
org.vim.hh-file
org.vim.pch++-file
org.vim.c-file
org.vim.m-file
org.vim.mm-file
org.vim.cc-file
org.vim.asm-file
org.vim.r-file
org.vim.java-file
org.vim.l-file
org.vim.y-file
org.vim.defs-file
org.vim.exp-file
org.vim.f-file
org.vim.pas-file
org.vim.ada-file
org.vim.html-file
org.vim.xml-file
org.vim.js-file
org.vim.pl-file
org.vim.py-file
org.vim.php-file
org.vim.rb-file
org.vim.sh-file
org.vim.class-file
org.vim.patch-file
org.vim.strings-file
org.vim.applescript-file
org.vim.as-file
org.vim.asp-file
org.vim.aspx-file
org.vim.bib-file
org.vim.cs-file
org.vim.cfdg-file
org.vim.csv-file
org.vim.tsv-file
org.vim.cgi-file
org.vim.cfg-file
org.vim.css-file
org.vim.dtd-file
org.vim.dylan-file
org.vim.erl-file
org.vim.fscript-file
org.vim.hs-file
org.vim.inc-file
org.vim.ics-file
org.vim.ini-file
org.vim.io-file
org.vim.bsh-file
org.vim.properties-file
org.vim.jsp-file
org.vim.lisp-file
org.vim.log-file
org.vim.wiki-file
org.vim.ps-file
org.vim.scm-file
org.vim.sql-file
org.vim.tcl-file
org.vim.xsl-file
org.vim.vcf-file
org.vim.vb-file
org.vim.yaml-file
org.vim.gtd-file
org.vim.markdown-file
org.vim.rst-file
org.vim.vba-file
Original comment by bjorn.winckler@gmail.com
on 29 Sep 2009 at 7:51
It just struck me that some of those UTI may be hard to guess what they
actually stand for. Here's the list
with descriptions as well:
<key>UTTypeDescription</key>
<string>VimScriptFile</string>
<key>UTTypeIdentifier</key>
<string>org.vim.vim-file</string>
--
<key>UTTypeDescription</key>
<string>PlainTextFile</string>
<key>UTTypeIdentifier</key>
<string>org.vim.text-file</string>
--
<key>UTTypeDescription</key>
<string>TeXFile</string>
<key>UTTypeIdentifier</key>
<string>org.vim.tex-file</string>
--
<key>UTTypeDescription</key>
<string>CHeaderSourceFile</string>
<key>UTTypeIdentifier</key>
<string>org.vim.h-file</string>
--
<key>UTTypeDescription</key>
<string>CPrecompiledHeaderSourceFile</string>
<key>UTTypeIdentifier</key>
<string>org.vim.pch-file</string>
--
<key>UTTypeDescription</key>
<string>C++HeaderSourceFile</string>
<key>UTTypeIdentifier</key>
<string>org.vim.hh-file</string>
--
<key>UTTypeDescription</key>
<string>C++PrecompiledHeaderSourceFile</string>
<key>UTTypeIdentifier</key>
<string>org.vim.pch++-file</string>
--
<key>UTTypeDescription</key>
<string>CSourceFile</string>
<key>UTTypeIdentifier</key>
<string>org.vim.c-file</string>
--
<key>UTTypeDescription</key>
<string>Objective-CSourceFile</string>
<key>UTTypeIdentifier</key>
<string>org.vim.m-file</string>
--
<key>UTTypeDescription</key>
<string>Objective-C++SourceFile</string>
<key>UTTypeIdentifier</key>
<string>org.vim.mm-file</string>
--
<key>UTTypeDescription</key>
<string>C++SourceFile</string>
<key>UTTypeIdentifier</key>
<string>org.vim.cc-file</string>
--
<key>UTTypeDescription</key>
<string>AssemblySourceFile</string>
<key>UTTypeIdentifier</key>
<string>org.vim.asm-file</string>
--
<key>UTTypeDescription</key>
<string>RezSourceFile</string>
<key>UTTypeIdentifier</key>
<string>org.vim.r-file</string>
--
<key>UTTypeDescription</key>
<string>JavaSourceFile</string>
<key>UTTypeIdentifier</key>
<string>org.vim.java-file</string>
--
<key>UTTypeDescription</key>
<string>LexSourceFile</string>
<key>UTTypeIdentifier</key>
<string>org.vim.l-file</string>
--
<key>UTTypeDescription</key>
<string>YaccSourceFile</string>
<key>UTTypeIdentifier</key>
<string>org.vim.y-file</string>
--
<key>UTTypeDescription</key>
<string>MigDefinitionFile</string>
<key>UTTypeIdentifier</key>
<string>org.vim.defs-file</string>
--
<key>UTTypeDescription</key>
<string>SymbolExportFile</string>
<key>UTTypeIdentifier</key>
<string>org.vim.exp-file</string>
--
<key>UTTypeDescription</key>
<string>FortranSourceFile</string>
<key>UTTypeIdentifier</key>
<string>org.vim.f-file</string>
--
<key>UTTypeDescription</key>
<string>PascalSourcefile</string>
<key>UTTypeIdentifier</key>
<string>org.vim.pas-file</string>
--
<key>UTTypeDescription</key>
<string>AdaSourceFile</string>
<key>UTTypeIdentifier</key>
<string>org.vim.ada-file</string>
--
<key>UTTypeDescription</key>
<string>HTMLSourceFile</string>
<key>UTTypeIdentifier</key>
<string>org.vim.html-file</string>
--
<key>UTTypeDescription</key>
<string>XMLSourceFile</string>
<key>UTTypeIdentifier</key>
<string>org.vim.xml-file</string>
--
<key>UTTypeDescription</key>
<string>JavaScriptSourceFile</string>
<key>UTTypeIdentifier</key>
<string>org.vim.js-file</string>
--
<key>UTTypeDescription</key>
<string>Perlsource</string>
<key>UTTypeIdentifier</key>
<string>org.vim.pl-file</string>
--
<key>UTTypeDescription</key>
<string>Pythonsource</string>
<key>UTTypeIdentifier</key>
<string>org.vim.py-file</string>
--
<key>UTTypeDescription</key>
<string>PHPsource</string>
<key>UTTypeIdentifier</key>
<string>org.vim.php-file</string>
--
<key>UTTypeDescription</key>
<string>Rubysource</string>
<key>UTTypeIdentifier</key>
<string>org.vim.rb-file</string>
--
<key>UTTypeDescription</key>
<string>Shellscript</string>
<key>UTTypeIdentifier</key>
<string>org.vim.sh-file</string>
--
<key>UTTypeDescription</key>
<string>JavaClassFile</string>
<key>UTTypeIdentifier</key>
<string>org.vim.class-file</string>
--
<key>UTTypeDescription</key>
<string>PatchFile</string>
<key>UTTypeIdentifier</key>
<string>org.vim.patch-file</string>
--
<key>UTTypeDescription</key>
<string>StringsFile</string>
<key>UTTypeIdentifier</key>
<string>org.vim.strings-file</string>
--
<key>UTTypeDescription</key>
<string>AppleScriptsource</string>
<key>UTTypeIdentifier</key>
<string>org.vim.applescript-file</string>
--
<key>UTTypeDescription</key>
<string>ActionScriptsource</string>
<key>UTTypeIdentifier</key>
<string>org.vim.as-file</string>
--
<key>UTTypeDescription</key>
<string>ASPdocument</string>
<key>UTTypeIdentifier</key>
<string>org.vim.asp-file</string>
--
<key>UTTypeDescription</key>
<string>ASP.NETdocument</string>
<key>UTTypeIdentifier</key>
<string>org.vim.aspx-file</string>
--
<key>UTTypeDescription</key>
<string>BibTeXbibliography</string>
<key>UTTypeIdentifier</key>
<string>org.vim.bib-file</string>
--
<key>UTTypeDescription</key>
<string>C#source</string>
<key>UTTypeIdentifier</key>
<string>org.vim.cs-file</string>
--
<key>UTTypeDescription</key>
<string>ContextFreeDesignGrammar</string>
<key>UTTypeIdentifier</key>
<string>org.vim.cfdg-file</string>
--
<key>UTTypeDescription</key>
<string>Commaseparatedvalues</string>
<key>UTTypeIdentifier</key>
<string>org.vim.csv-file</string>
--
<key>UTTypeDescription</key>
<string>Tabseparatedvalues</string>
<key>UTTypeIdentifier</key>
<string>org.vim.tsv-file</string>
--
<key>UTTypeDescription</key>
<string>CGIscript</string>
<key>UTTypeIdentifier</key>
<string>org.vim.cgi-file</string>
--
<key>UTTypeDescription</key>
<string>Configurationfile</string>
<key>UTTypeIdentifier</key>
<string>org.vim.cfg-file</string>
--
<key>UTTypeDescription</key>
<string>Cascadingstylesheet</string>
<key>UTTypeIdentifier</key>
<string>org.vim.css-file</string>
--
<key>UTTypeDescription</key>
<string>DocumentTypeDefinition</string>
<key>UTTypeIdentifier</key>
<string>org.vim.dtd-file</string>
--
<key>UTTypeDescription</key>
<string>Dylansource</string>
<key>UTTypeIdentifier</key>
<string>org.vim.dylan-file</string>
--
<key>UTTypeDescription</key>
<string>Erlangsource</string>
<key>UTTypeIdentifier</key>
<string>org.vim.erl-file</string>
--
<key>UTTypeDescription</key>
<string>F-Scriptsource</string>
<key>UTTypeIdentifier</key>
<string>org.vim.fscript-file</string>
--
<key>UTTypeDescription</key>
<string>Haskellsource</string>
<key>UTTypeIdentifier</key>
<string>org.vim.hs-file</string>
--
<key>UTTypeDescription</key>
<string>Includefile</string>
<key>UTTypeIdentifier</key>
<string>org.vim.inc-file</string>
--
<key>UTTypeDescription</key>
<string>iCalendarschedule</string>
<key>UTTypeIdentifier</key>
<string>org.vim.ics-file</string>
--
<key>UTTypeDescription</key>
<string>MSWindowsinitializationfile</string>
<key>UTTypeIdentifier</key>
<string>org.vim.ini-file</string>
--
<key>UTTypeDescription</key>
<string>Iosource</string>
<key>UTTypeIdentifier</key>
<string>org.vim.io-file</string>
--
<key>UTTypeDescription</key>
<string>BeanShellscript</string>
<key>UTTypeIdentifier</key>
<string>org.vim.bsh-file</string>
--
<key>UTTypeDescription</key>
<string>Javapropertiesfile</string>
<key>UTTypeIdentifier</key>
<string>org.vim.properties-file</string>
--
<key>UTTypeDescription</key>
<string>JavaServerPage</string>
<key>UTTypeIdentifier</key>
<string>org.vim.jsp-file</string>
--
<key>UTTypeDescription</key>
<string>LISPsource</string>
<key>UTTypeIdentifier</key>
<string>org.vim.lisp-file</string>
--
<key>UTTypeDescription</key>
<string>Logfile</string>
<key>UTTypeIdentifier</key>
<string>org.vim.log-file</string>
--
<key>UTTypeDescription</key>
<string>Mediawikidocument</string>
<key>UTTypeIdentifier</key>
<string>org.vim.wiki-file</string>
--
<key>UTTypeDescription</key>
<string>PostScriptsource</string>
<key>UTTypeIdentifier</key>
<string>org.vim.ps-file</string>
--
<key>UTTypeDescription</key>
<string>Schemesource</string>
<key>UTTypeIdentifier</key>
<string>org.vim.scm-file</string>
--
<key>UTTypeDescription</key>
<string>SQLsource</string>
<key>UTTypeIdentifier</key>
<string>org.vim.sql-file</string>
--
<key>UTTypeDescription</key>
<string>Tclsource</string>
<key>UTTypeIdentifier</key>
<string>org.vim.tcl-file</string>
--
<key>UTTypeDescription</key>
<string>XSLstylesheet</string>
<key>UTTypeIdentifier</key>
<string>org.vim.xsl-file</string>
--
<key>UTTypeDescription</key>
<string>Electronicbusinesscard</string>
<key>UTTypeIdentifier</key>
<string>org.vim.vcf-file</string>
--
<key>UTTypeDescription</key>
<string>VisualBasicsource</string>
<key>UTTypeIdentifier</key>
<string>org.vim.vb-file</string>
--
<key>UTTypeDescription</key>
<string>YAMLdocument</string>
<key>UTTypeIdentifier</key>
<string>org.vim.yaml-file</string>
--
<key>UTTypeDescription</key>
<string>GTDdocument</string>
<key>UTTypeIdentifier</key>
<string>org.vim.gtd-file</string>
--
<key>UTTypeDescription</key>
<string>Markdowndocument</string>
<key>UTTypeIdentifier</key>
<string>org.vim.markdown-file</string>
--
<key>UTTypeDescription</key>
<string>reStructuredTextdocument</string>
<key>UTTypeIdentifier</key>
<string>org.vim.rst-file</string>
--
<key>UTTypeDescription</key>
<string>VimballArchive</string>
<key>UTTypeIdentifier</key>
<string>org.vim.vba-file</string>
Original comment by bjorn.winckler@gmail.com
on 29 Sep 2009 at 7:57
OK, this felt so magically retarded, almost like editing a Windows Registry.
The fact that you should use UTIs
starting with `com.apple.xcode` for non-Apple filetypes (like Fortran) to avoid
conflicts is indicative of what a
mess UTI hell is going to be.
Right off the bat, let's look at Apple-made software that edits relevant
source-code types:
from /Developer/Applications/Xcode.app/Contents/Info.plist --
<string>C Header Source File</string>
<string>public.c-header</string>
<string>h</string>
<string>C++ Header Source File</string>
<string>public.c-plus-plus-header</string>
<string>hh</string>
<string>hp</string>
<string>hpp</string>
<string>hxx</string>
<string>h++</string>
<string>C Source File</string>
<string>public.c-source</string>
<string>c</string>
<string>Objective-C Source File</string>
<string>public.objective-c-source</string>
<string>m</string>
<string>Objective-C++ Source File</string>
<string>public.objective-c-plus-plus-source</string>
<string>mm</string>
<string>C++ Source File</string>
<string>public.c-plus-plus-source</string>
<string>cc</string>
<string>cp</string>
<string>cpp</string>
<string>cxx</string>
<string>c++</string>
<string>Assembly Source File</string>
<string>public.assembly-source</string>
<string>s</string>
<string>asm</string>
<string>Java Source File</string>
<string>com.sun.java-source</string>
<string>java</string>
<string>jav</string>
<string>Lex Source File</string>
<string>com.apple.xcode.lex-source</string>
<string>l</string>
<string>lm</string>
<string>lmm</string>
<string>lpp</string>
<string>lxx</string>
<string>Yacc Source File</string>
<string>com.apple.xcode.yacc-source</string>
<string>y</string>
<string>ym</string>
<string>ymm</string>
<string>ypp</string>
<string>yxx</string>
<string>Ruby Source File</string>
<string>public.ruby-script</string>
<string>rb</string>
<string>Symbol Export File</string>
<string>com.apple.symbol-export</string>
<string>exp</string>
<string>Fortran Source File</string>
<string>com.apple.xcode.fortran-source</string>
<string>f</string>
<string>for</string>
<string>f77</string>
<string>f95</string>
<string>Pascal Source file</string>
<string>com.apple.xcode.pascal-source</string>
<string>pas</string>
<string>Ada Source File</string>
<string>com.apple.xcode.ada-source</string>
<string>ada</string>
<string>adb</string>
<string>ads</string>
<string>Java Class File</string>
<string>com.sun.java-class</string>
<string>class</string>
from /Developer/Applications/Dashcode.app/Contents/Info.plist --
<string>HTML document</string>
<string>public.html</string>
<string>html</string>
Generally, it is a good idea to take a look at these files, there is some
wisdom to be gained. I'll bring more as
I find them.
Original comment by ycherkashin
on 29 Sep 2009 at 8:25
Yeah, those Apple UTIs starting with com.apple... is what made me think that I
could assign any arbitrary string
and thus I chose org.vim... instead. :-/
Original comment by bjorn.winckler@gmail.com
on 29 Sep 2009 at 8:30
And generally you should be able to, it is not your faulty expectations at play
but the exact reverse of the
natural order, as we can see.
More of them:
from /Applications/Utilities/Terminal.app/Contents/Info.plist --
<string>Shell script</string>
<key>UTTypeConformsTo</key>
<string>public.shell-script</string>
<key>UTTypeIdentifier</key>
<string>com.apple.terminal.shell-script</string>
<string>sh</string>
<string>bash</string>
from /Applications/Utilities/Console.app/Contents/Info.plist -- (!) careful
<string>Generic Log Type</string>
<key>UTTypeConformsTo</key>
<string>public.item</string>
<string>public.log</string>
<string>LogFile</string>
<key>UTTypeConformsTo</key>
<string>public.plain-text</string>
<string>public.log</string>
<string>com.apple.log</string>
<string>log</string>
<string>NSStringPboardType</string>
<string>text/plain</string>
<string>txt</string>
<string>text</string>
<string>*</string>
Original comment by ycherkashin
on 29 Sep 2009 at 8:43
Here's an interesting writeup on the issue:
http://boredzo.org/blog/archives/2009-09-22/how-not-to-use-
utis
Original comment by ycherkashin
on 1 Oct 2009 at 6:14
Any more UTIs? I've updated the snapshot (50) with the above UTIs.
Original comment by bjorn.winckler@gmail.com
on 24 Nov 2009 at 3:51
I'll close this issue for now, but if there are any more UTIs please send them
my way.
Original comment by bjorn.winckler@gmail.com
on 31 Dec 2010 at 2:17
Original issue reported on code.google.com by
ycherkashin
on 29 Sep 2009 at 7:05