

Use OSX Finder Quicklook (Spacebar) to preview all plain text files - rover
http://coderwall.com/p/dlithw

======
pooriaazimi
More QuickLook plugins:

<http://www.qlplugins.com>

<http://www.quicklookplugins.com>

This one is my favorite: <http://macitbetter.com/BetterZip-Quick-Look-
Generator/>

~~~
5teev
For iOS developers, this one reveals a lot of useful information about
provisioning profiles:

[http://www.macmation.com/blog/2011/10/quicklook-plugin-
for-m...](http://www.macmation.com/blog/2011/10/quicklook-plugin-for-mobile-
provision-files/)

------
rasmus_b
Code syntex highlight <http://code.google.com/p/qlcolorcode/>

~~~
Watabou
Now that is just awesome. Thank you!

~~~
rover
beware though. might not work after latest XCode installation

~~~
Watabou
I don't have XCode installed as of yet. I'm on Mountain Lion and I'm waiting
for both the official release of ML and XCode on the App Store. Will XCode for
ML still interfere with this plugin or is there any other plugin with similar
functionality?

~~~
rover
well, i don't really know.

------
aes256
Thanks so much for this. For the longest time I've found it irritating that I
couldn't preview plaintext .nfo files with Quicklook.

I didn't realise Quicklook plugins were a thing...

~~~
rover
well, so did i. Irritation is the root of all hacks :)

------
pstadler
Somehow off topic but this is a very neat trick: You can preview the selected
item directly in the Spotlight menu by pressing the left arrow key.

Source: [http://www.macstories.net/mac/all-you-need-to-know-about-
qui...](http://www.macstories.net/mac/all-you-need-to-know-about-quick-look-
in-lion-plus-some-handy-tips-and-tricks/)

~~~
jkbr
IMO the preview appears automatically after ~2 seconds without having to press
any key. Useful feature indeed.

~~~
pstadler
I guess you're right. Though I never recognized this before and since I'm
using Alfred, I don't touch Spotlight that often.

~~~
skinnymuch
On mobile device right now, but earlier today Alfred prompted for a beta
update which included some Spotlight features. Not sure about the details or
if it's only part of the paid Powerpack

------
pstadler
Nice plugin!

Pro tip: Instead of restarting finder run `qlmanage -r`

~~~
rover
Sweet !

------
miles
Suspicious Package <http://www.mothersruin.com/software/SuspiciousPackage/> is
another neat QuickLook plugin that displays detailed information about
Installer Packages (.pkg files).

~~~
rover
Yeah, it's pretty sweet.

------
Zirro
I'll take the opportunity to ask: Is there a way to make Spotlight index files
in the Library folders? There are sometimes some obscure preference or cache-
files that I need to find.

~~~
pooriaazimi
This is 100% off-topic, but since this submission has 100+ upvotes and many
might view the comment thread, and you mentioned Library/ folder, I think it's
good to point out that you can easily make Library/ folder visible again in
Lion.

Just type:

    
    
        chflags nohidden ~/Library
    

in the Terminal.

~~~
evilduck
You can also access hidden directories from Finder with Cmd-Shift-G and
manually typing their path.

Personally, I infrequently access my ~/Library and I know it's there and what
it contains and I can hop over to it quickly if needed that I prefer it hidden
for visual simplicity.

------
vito
Is there something like this for Chrome? Really annoying having code
downloaded instead of displayed.

~~~
nikcub
No. It has to be sent as text/plain for Chrome to view the file if it is on a
remote server. The MIME types that are opened in the browser instead of
downloaded are hardcoded within the Chrome source.

Numerous feature requests have been submitted[1] to update this functionality
and to provide a preferences pane for users to decide how they want different
file types handled, but they have been ignored as this behavior is a design
decision.

[1]
[http://code.google.com/p/chromium/issues/detail?id=118204...](http://code.google.com/p/chromium/issues/detail?id=118204&thanks=118204&ts=1331749873)

------
mtr
On a related note, is there any way to get Spotlight to index _all_ text
files?

~~~
rover
I wouldn't know why you'd want to do so(slowing down the search), but it seems
possible (or close enough).

Scroll at the way to "Make Spotlight index source code" here.
[http://www.macosxtips.co.uk/index_files/terminal-commands-
fo...](http://www.macosxtips.co.uk/index_files/terminal-commands-for-
improving-spotlight.php)

~~~
Groxx
That assumes you care about the speed more than the results. Quicksilver or
Alfred completely replace Spotlight for anything frequent; I'd be happy if it
took 5 _minutes_ , if it could _always_ find what I was looking for.

------
matthijs
Would it be possible to make the text inside the Quicklook window selectable?
I often just want to quickly copy something from a file, and Quicklook would
be the fastest way to do so.

~~~
Watabou
Yes there is a way. Open up terminal and type this in:

defaults write com.apple.finder QLEnableTextSelection -bool true

Then restart the Finder by typing in this into the Terminal:

killall Finder

~~~
Groxx
Why isn't this the default...? Many thanks :)

------
zwass
File this under things that should have worked in the first place.

------
SmileyKeith
This is fantastic. Always wondered why quick look wasn't set up to parse plain
text files just because they had a different extension. Especially Markdown.

------
lorrin
Anyone know how to control what the Open with button offers? E.g. it's
offering "Open with Sublime Text 2" and I'd rather have an Open with MacVim.

~~~
rover
It's pretty simple and managed by OSX.

\- Select a filetype you'd want to change the default application for and open
the File Info (Cmd+I) \- In the "Open with" section, select the app you want
to be the default app for the filetype \- To persist the default app along the
whole filetype, also click the "Change All" button right below it.

~~~
Watabou
You can also hold down the open button and a list of alternate applications
that can be used to open the document drops down. Pretty handy.

------
backwardm
You can also add a QuickLook directory to your own ~/Library if you are into
keeping stuff separated.

------
uladzislau
Is there any way to change the font or its size in Quicklook?

------
hcarvalhoalves
As always... simple hacks, the best hacks!

~~~
rover
:)

------
redog
Is there such thing as plain text?

~~~
rover
well... :)

------
magoon
This is so good

~~~
rover
isn't it ? made me a happy person :)

------
miggaiowski
.org files =)

------
205guy
So now opening a text file is "cutting edge?" [1]

[1] <http://news.ycombinator.com/item?id=4226539>

PS, just like clicking "More" on HN front page after reading a few articles
results in a "cutting edge" error.

