Pergunta

Is there a Quick Look plugin to see the contents of any text file with any extension instead of just showing the icon.

Foi útil?

Solução

Is there a Quick Look plugin to see the contents of any text file with any extension instead of just showing the icon.

The short answer is “no.”

Can you develop quick look plugins? Of course you can! However, things fall short with the requirement of any text file with any extension.

Files types and their associations, like what to open it with, what to edit it with and even what icon to show are all handled by LaunchServices. The problem with “any file/any extension” is there’s no way to associate that with a particular quick view plugin. For example which plugin would be associated with the shell script I wrote called foobar and the binary data file barfoo both with no extension? Not all “no extension” files are of the the same type; in your case, text.

You can get more information regarding LaunchServices from the Development Guide

Outras dicas

There are quick look plugins that you can use to have the right app be used for quick look. These are stored in Library/Quicklook and ~Library/Quicklook. To view these files right-click on them and select View Contents. There is a repository of Quick Look plugins located here.. These can be easily installed manually. There is a more thorough description of this at this link. There are instructions to build a Quick Look plugin here.

I use Sublime Text so I picked some extension-less files &:

  • Right click > Get info.
  • Open with "Sublime Text" & change all.

Then sublime handles it for all the files that it can read through. Be careful with executable/ scripts though. Don't double click on them. A new kMDItemContentType can ditch you there.

For other files with recognised extensions, .php, .py etc, you'd have to change them individually, per format.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a apple.stackexchange
scroll top