How to get macOS file previews for non-standard text files

macOS has a built-in preview generator for .txt and .text files, but it’s not able to handle text files that have no file extension, like Makefiles. It will also ignore textual files with other file extensions, such as subtitle files and .nfo files. This was bugging me, so I wrote an addition to my PreviewApps range to tackle these files. It’s called PreviewText and it’s available now, free of charge, from the Mac App Store.

PreviewText's main UI

Now, I used to use a free tool called QLStephen for this kind of thing. But changes that Apple has made to macOS’ security over the last few years has made QLStephen less useful. First, you now have to jump through hoops to get it to run. This is because it hasn’t been signed by a registered developer. More to the point, it uses the obsolete QuickLook Generator mechanism that Apple deprecated four years or more ago.

A sample preview of an extensionless text file
A sample preview of an extensionless text file

PreviewText uses the recommended approach: provide file previewers and thumbnail generators as app extensions. These contain code called by Finder as a when it has a file to preview or is about to present a newly opened folder. Indeed, PreviewText is little more than a carrier for its extensions. It also serves as a UI for setting preview preferences.

Set your preview preferences
Set your preview preferences to suit your tastes, whatever macOS UI mode you favour

PreviewText currently supports text files without a filename extension, plus files with the .1st, .asc, .nfo, .srt and .sub extensions, the latter because I was asked by a user to support them in my source-code oriented PreviewCode. However, PreviewText is a better home for them, I think. Other text-but-not-.txt files’ extensions may be added in future releases.

PreviewText is available now for free at the Mac App Store.

And the source code’s on GitHub.