I love a good Mac or iOS tip. I found this one particularly helpful.
If you select a file in the Finder, then hit the space bar, the Finder will pop up a window displaying the contents of the file, known as a Quick Look preview. Not every app supports Quick Look, but most do.
By default, the Finder does not allow you to copy text from a Quick Look. Turns out there’s a setting you can tweak to enable text copy.
Launch Terminal (Applications > Utilities > Terminal) and type these two commands:
defaults write com.apple.finder QLEnableTextSelection -bool true
killall Finder
Change “true” to “false” to reverse this…
Now go back and copy as much text as your heart desires. Huzzah!
2 commands? It looks like just the 1 command there.
The second command starts with killall. With that you restart the Finder to enable the changes. Otherwise you’d have to restart the machine or force quit the Finder.
BTW: To reverse, you simply type “false” instead of “true”?
Sorry about that. Had to tweak the html to get the extra line break. Thanks for catching that. And thanks, Thomas for the response. I’ll add the “false instead of true” to the post.
SWEET.
add a semicolon (;) if you will for a one liner e.g.:
defaults write com.apple.finder QLEnableTextSelection -bool true ; killall Finder
This is awesome, thanks!!
Nice vagazilling… 😉
So how do you tell the Finder to give a text Quick Look for a particular file type?
by using
defaults write -g QLEnableTextSelection -bool TRUE
instead you would enable it for any of your apps in one go, rather than finder.app (or mail.app) only one by one
restarting the given app may still be necessary
found another related tip http://www.mactricksandtips.com/2013/01/22-finder-hacks-tricks-and-changes.html:
to stop the (finder.app) quicklook preview from disappearing when switching to another app use these commands (so the quicklook window will stay open & you can view the contents while having a second application selected):
change “false” to “true” to reverse this…
ps: by using
you change the behavior for any app instead of only for finder.app
Awesome stuff. Really appreciate it!