How to get Mac OSX Finder to preview text files that do not have the extension .txt or .text?

Programming is clearly associated with a lot of text file usage. You often want to see what you did somewhere else in some other program without loading the whole program into your current IDE of your choice.

If I copy a text file from say fred.cppto fred.cpp.text, I can view the contents of the file from the Finder preview. But I do not want to copy or rename all my development files.

In 2003 (!) A message on MacOSHints there is an instruction for this

find . -name *.xml -exec SetFile -t TEXT {} ;

(in this case for * .xml files), but this did not help me because of problems with the command exec. But in any case, of course, is there a better way to do this from the GUI?

Anyway: a command line or GUI solution would be great, thanks!

+4
source share
2 answers

There is a Textmate QuickLook plugin that only works with running Textmate.

Pro: Syntax highlighting
Contra: Only with (non-free) text-to-text


Alternative: QLStephen

QLStephen is an Apple OSX QuickLook plugin that allows you to view text files without a file extension.

But it works for all text files (even with the extension).

Pro:
Contra:

+5

Source: https://habr.com/ru/post/1542997/


All Articles