Monday, September 21, 2009

Quick Tip: Additional File Types for OS X Quick Look

As I am diving into cucumber, I would like OS X Quick Look to display my .feature files.
(and while I was already at it, I also enabled Quick Look for .properties and .textile files)

This is what I did:
  • I navigated into the TextMate package (right-click->Show Package Contents).
  • I edited Contents/Info.plist with a text-editor.
  • I added the follwing snippet at the end of Info.plist (just before the ending </dict> </plist>)
  • <!-- inserted jb, 20090920 for QuickLook improvement -->  
    <key>UTExportedTypeDeclarations</key>  
     <array>  
       <dict>  
         <key>UTTypeConformsTo</key>  
         <array>  
           <string>public.text</string>  
            <string>public.plain-text</string>  
         </array>  
         <key>UTTypeDescription</key>  
         <string>Code</string>  
         <key>UTTypeIdentifier</key>  
         <string>com.macromates.textmate</string>  
         <key>UTTypeTagSpecification</key>  
         <dict>  
           <key>com.apple.ostype</key>  
           <string>TEXT</string>  
           <key>public.filename-extension</key>  
           <array>  
             <string>properties</string>  
             <string>textile</string>  
             <string>feature</string>
           </array>  
         </dict>  
       </dict>  
     </array>
    
  • Then I set TextMate as the default editor for .feature files.
  • Finally I nudged the system o tell it something has changed with touch /Applications/TextMate.app and qlmanage -r on the commandline.

  • The result:
    Picture 3.png

    No comments:

    Post a Comment

    Related Posts Plugin for WordPress, Blogger...