1

I was recently installing/uninstalling/re-installing some third-party Quick Look extensions (brew cask install qlstephen among others). When all the dust had settled everything worked well except Quick Look for .txt files no longer works (I get the default Dear Kate letter). Quick Look for .rtf files works fine.

By the way, the qlstephen extension is working OK for files without file extensions. I suspect that problem arose during the uninstalling/re-installing of everything. I'm running High Sierra.

Any suggestions for getting Quick Look working for plain text .txt files?

1

To see what application can handle a Quick Look view try in the terminal: qlmanage -m plugins.

This will show a list in the form filetype -> provider, where filetype is in the form com.company-name.filetype like com.apple.mail.email.
The filetype-part shows the full path to the Quick Look plugin.

So in total it shows a line like

com.apple.mail.email -> /System/Library/QuickLook/Mail.qlgenerator (3445.5.20)

This shows that email is handled by the Mail.qlgenerator.

You can filter the long list down with grep:

  • text files: qlmanage -m plugins | grep -i "text"
  • plain text files: qlmanage -m plugins | grep -i "plain-text"

It is possible that more than one generator is available for a particular filetype.

According to qlmanage -h there is the -g option:

-g generator    Force the generator to use

The general usage of qlmanage is qlmanage [OPTIONS] path...

However I've never used this -g option.

  • How can this be used to restore the standard generator for public.plain-text? – nohillside Dec 11 '17 at 19:02
  • 1
    That did it. I found one of the newly installed Quick Look extensions ("QLColorCode") was overriding plain-text files, but not displaying them. Removing it solved my problem. – Jeff Staley Dec 12 '17 at 3:50
0

The solution that actually worked for me without uninstalling QLColorCode was to re-install highlight :

brew reinstall highlight

I got a lead on this issue : No preview of file content just an icon...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .