Copy text from directly Quick Look

What is Quick Look?

Quick Look is a simple feature in Mac OS X that lets you instantly preview the contents of files without having to open them in an application. To use Quick Look is very simple:
- select a file in a Finder window or on the desktop,
- hit [SPACE] button.

The contents of the selected file will be instantly viewable in a pop-up window.
The Quick Look window will disappear immediately if you hit again [SPACE] button.


New feature in OS X Lion for Quick Look

If you use Quick Look to view any files that feature text you will find that you can’t click and drag to highlight text by default. You can click anywhere on the Quick Look window, it simply moves it around, and no more. But sometime it would be useful to copy a part of the text from directly the Quick Look window, without opening the file in another program.

Well, there is a secret setting! It will let you click and drag as usual to highlight text, also you can use the standard key combination of [Command]+[C] to copy text.
Note: the Quick Look window can still be moved by clicking and dragging its title bar, as with any other program window in Mac OS X.

So let see the secret setting! It’s very simple, just open a Terminal window and type the following and hit [Enter]:

defaults write QLEnableTextSelection -bool TRUE;killall Finder

The changes take effect immediately, you can try it.

If you don’t want  to use this feature later (I don’t think so … :) , you can  deactivate it opening the Terminal window again and typing the command below and hit [Enter]:

defaults delete QLEnableTextSelection;killall Finder

The source of this trick is the following book:

Mac Kung Fu: Over 300 Tips, Tricks, Hints, and Hacks for OS X Lion

by Keir Thomas

After you’ve uncovered the basics in Lion, Mac Kung Fu is your next step. You’ll learn how to master everyday tools such as the Dock, Spotlight, Mission Control, Launchpad, and Dashboard. You’ll discover other amazingly useful tools and built-in add-ons that you never knew existed. You’ll customize the OS X interface; refine your workflow; learn valuable security tricks; work better with photos, movies, and documents; and test your Mac hardware. You’ll wow friends with your insanely great Mac knowledge!

Mac Kung Fu details things even Mac Geniuses don’t know. And why should they? Many of the tips in this book exploit settings or experimental features never officially made public.

Each tip in this unique book is deliberately short and readable, and you can dip in and out whenever you want. Most take less than a minute to complete, yet the results last for a lifetime of better computing.

Contents and Extracts