.txt quicklook plugin?

it has always puzzled me why quicklook will not handle simple .txt files. it also puzzles me that I have looked extensively and cannot find such a plugin. the closest I have come is a plugin called qlstephen, which shows a number of plain text files so long as they do not have a suffix attached.
does anyone know of such a plugin, or how I might enable quicklook with .txt files?

thanks

g5 iMac 17", Mac OS X (10.5.7), aex

Posted on Jun 26, 2009 10:04 AM

Reply
8 replies

Jun 26, 2009 10:35 AM in response to homeshire

You don't need a plugin because you already have that functionality. Any file that has a .txt extension should open in QuickLook just fine. The weird problem is that plain text files, recognized as such by the Finder (GetInfo shows them as Plain Text, and they can even be assigned to open with TextEdit) won't work with QL without an extension. As soon as you add the .txt extension, they preview in QL just fine. Also, there are other plain text files, with a different extension such as .php and .css files, which will not show with QL. But plain text files with a .txt extension should "just work"--if yours aren't then something is wrong with your install.
Francine

User uploaded file
Francine
Schwieder

Jun 26, 2009 10:51 AM in response to Francine Schwieder

then something is not only wrong with my install, but has been from day one. I have never been able to preview .txt files in quicklook. I have always assumed it was a shortcoming of quicklook that would be remedied with a 3rd party plugin.

if indeed something is wrong with my install, what should I do about that? should I reinstall quicklook? what can I do?
thanks

Jun 26, 2009 12:27 PM in response to homeshire

I believe the text files are handled by a basic part of a normal install, the Text.qlgenerator. It should be here:

/System/Library/Frameworks/QuickLook.framework/Versions/A/Resources/Generators/T ext.qlgenerator

Also in that folder should be the following:

Audio.qlgenerator
Bookmark.qlgenerator
Contact.qlgenerator
Font.qlgenerator
iCal.qlgenerator
Mail.qlgenerator
Movie.qlgenerator
Package.qlgenerator
PDF.qlgenerator
StandardBundles.qlgenerator
Text.qlgenerator
Web.qlgenerator

The most recent version number for the Text generator is 1.3.1. Whether you can reinstall that using Pacifist, I just don't know. If the Text.qlgenerator is actually where it ought to be, you could try creating a new admin user, launch TextEdit and create a new text file (be sure it has the .txt extension!), then try QL there and see if it works. If it does work, then you know the basic system is actually OK. I would try that first.
Francine

User uploaded file
Francine
Schwieder

Jun 26, 2009 1:08 PM in response to Francine Schwieder

Francine --

curioser and curioser

my Text.qlgenerator is exactly where it should be, as is the entire folder exactly as it should be. I did indeed use Pacifist to reinstall it. Pacifist claimed to do so. no avail.

nothing changes. still can't ql a .txt file. ql has no problem with .rtf, pages, .odt or any other number of things. but throw a simple .txt at it and it comes up with nothing more than a generic icon.

i also went to my troubleshooting account (actually, i tried 2 different ones) and that did nothing to resolve the issue.

i'm flummoxed.

Jun 26, 2009 2:39 PM in response to homeshire

Sounds rather odd to me. As I mentioned, plain text files that do not have a .txt extension show as a blank page, and will not display in QL, but once the extension is added to the file name, they acquire the generic text icon, and show in QL. You might open Console and do a QL on a text file and see if an error shows up.

When you do a QL the Finder should also show a boost in the % of CPU that it is using. Try launching Activity Monitor and determine if you see such an increase when you hit the spacebar for different files--more complex things, such RTF or PDFs with graphics and what not, boost finder CPU use by up to 10% on my machine, a simple text file about 2%. If I inspect the Finder with Activity Monitor and have it display Open Files and Ports, while I have a QL up of a text file, I see the following items present that are related to QuickLook:

/System/Library/PrivateFrameworks/QuickLookUI.framework/Versions/A/Resources/Dis playBundles/Web.qldisplay/Contents/MacOS/Web
/System/Library/PrivateFrameworks/QuickLookUI.framework/Versions/A/Resources/Dis playBundles/PDF.qldisplay/Contents/MacOS/PDF
/System/Library/Frameworks/QuickLook.framework/Versions/A/Resources/Page01BaseMa skCorner.png
/System/Library/Frameworks/QuickLook.framework/Versions/A/Resources/Page01BaseCu rl.png
/System/Library/PrivateFrameworks/QuickLookUI.framework/Versions/A/Resources/Dis playBundles/NSImage.qldisplay/Contents/MacOS/NSImage
/System/Library/PrivateFrameworks/QuickLookUI.framework/Versions/A/Resources/Dis playBundles/Generic.qldisplay/Contents/MacOS/Generic
/System/Library/Frameworks/QuickLook.framework/Versions/A/Resources/BookmarkGene ricIcon.png
/System/Library/Frameworks/QuickLook.framework/Versions/A/Resources/GenericFolde rFlat.png
/System/Library/PrivateFrameworks/QuickLookUI.framework/Versions/A/Resources/Dis playBundles/Text.qldisplay/Contents/MacOS/Text

If your Finder is also showing all of those in its operation, and you don't have any errors showing in Console, afraid I have no idea what is wrong nor how to fix it.
Francine

User uploaded file
Francine
Schwieder

Jun 27, 2009 5:43 AM in response to Francine Schwieder

Francine --

thanks for responding again. I did as you suggested, and indeed an error popped up in console --

quicklookd[52109] QLcolorcode: colorize.sh failed with exit code 127

this error repeated 2 or 3 times. i tried to take a snapshot to show completely, but as you might guess, console is an ever-moving target, so was happy in the end to capture at least part of it so that i could relay.

i guess my next move now is to discover what resources i have that might explain what the above console msg means.

any ideas???

thanks so much again

Jun 27, 2009 11:22 AM in response to homeshire

Well, the only reference I could find for "QLcolorcode" was to a plugin for colorizing source code, which I didn't have. So I downloaded a copy:

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

I installed it in the /Library/QuickLook folder, where it joined my collection of qlgenerators, and works as advertised, it does indeed colorize source code files (not something I have any use for actually). I don't get any error messages in Console, and my text files still display in QuickLook. You might look in both /Library/QuickLook and also see if you have it in /Users/yourname/Library/QuickLook (you may not have such a folder, I don't, but it is a possible place for it to be installed). It is even possible to accidently install it in /System/Library/QuickLook (all I have there are two plugins, I believe both were installed by Apple's installer, one is for iChat and the other for Office). So check and see if you find a QLColorCode.qlgenerator in any of those three possible locations. If you do find it, remove it. Try logging out and back in, or just relaunch Finder, and try QL again while watching Console.

Other than that I'm at a loss, other than thinking that something went basically wrong with your Leopard installation of the QuickLook components initially. Your statement about trying to take a snapshot in Console is worrying--in the last hour I've only gotten 7 messages in Console.
Francine

User uploaded file
Francine
Schwieder

Jun 27, 2009 4:11 PM in response to Francine Schwieder

Francine --

i've tried your every suggestion, and i have to conclude that just maybe my initial install had an error, leaving me without a plain text .txt ability in quicklook; however strange that may be. i can say that we are talking about an initial tiger install now nearly 4 yrs. old and upgraded to leopard and then all of it's updates. my install is not a model of efficiency in hard drive management...

i'm going to look further into my console activity. i know that when i generated that error in ql, console seemed on a never-ending binge of entries. so i guess that deserves some attention. i'm hoping it was just a bad moment to be looking at console.

when i get around to it, perhaps i'll reinstall ql with pacifist. it was never an urgent matter, rather a curiosity i had about something i thought was an uncharachteristic overisght on apple's part. now that i know there's an issue of some sort somewhere, it'll become an itch i just have to scratch.

in any event, i thank you for your insight and help.

best regards

homeshire

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

.txt quicklook plugin?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.