Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I find Finder's Quick Look feature (launched with 'space') very useful, but it works only for a limited number of file extensions. In work I often get .properties, .conf, .ddl and other files which are essentially text, yet in Quick Look their content is never displayed:

alt text

Is there any way I can tell my Mac to treat those files as text?

Thanks!

share|improve this question

4 Answers 4

up vote 18 down vote accepted

QLStephen adds support for both files without a filename extension (like README) and files with arbitrary extensions (like file.xyz).

share|improve this answer
    
Thanks to you and the author! –  Nikita Rybak Jun 18 '11 at 15:47
2  
The way to do this is to add public.data to any quicklook generator's plist. The downside is that binary files also do not have an extension and so it will try to display them, albiet usually with no negative consequences –  Brandon Nov 24 '11 at 10:06
    
@Brandon - it appears there is a directories blacklist in QLStephen which prevents files with no extensions from being shown if they are in the bin directory, also there is a whitelist which enables it for README and files of that sort which could work. I'm having trouble getting this to work on ML tho. –  cwd Oct 18 '12 at 17:43

You might also want to have a look at the QLColorCode and QLMarkdown plugins, for syntax highlighting of many languages and markdown rendering respectively.

http://code.google.com/p/qlcolorcode/

http://github.com/toland/qlmarkdown/

_c

share|improve this answer

It's possible, but not really easy.

If you look at /System/Library/QuickLook/Text.qlgenerator/Contents/Info.plist, you'll notice that the "text" preview is for the following UTIs:

public.plain-text
public.rtf
com.apple.rtfd
org.oasis-open.opendocument.text
com.apple.property-list
public.xml

This is how QuickLook knows which Plugin (qlgenerator) to use.


A (hackish) solution now would be to assign the extension properties the UTI public.plain-text. To do this, you could create a dummy application (e.g. created by Automator) that declares these file types like described here, only you'd use public.plain-text as UTI and properties as file extension.

share|improve this answer
    
In the end, I've added custom file types to existing text editor (TextWrangler). Works fine, thanks! –  Nikita Rybak Jan 9 '11 at 0:23
    
@Nikita It's easier, but be aware that any TextWrangler update will nuke your changes to Info.plist. –  Daniel Beck Jan 9 '11 at 8:32
    
I want to add a couple of extensions (.scala, .clj, .properties), what should I do? –  Chiron Mar 6 '11 at 12:28
    
@4bu3li Do what I wrote in my answer and it'll work, I just did it yesterday the same way. Or do you just require a more detailed explanation? –  Daniel Beck Mar 6 '11 at 12:51
    
I would like i more detailed explanation. Can't i not just add public.pde for example in the plist? –  clankill3r May 11 '13 at 10:50

A search for quicklook on github reveals that there is a large variety of extensions available:

and some (incomplete) collections:

share|improve this answer
    
    
    
None of those extensions or 'related' questions, as far as I can tell, answer the question I asked. –  Nikita Rybak Aug 4 '13 at 22:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.