Where developers come to connect, share, build and be inspired.


Copy text/code from OSX QuickLook directly


So, I assume you want to copy from the OSX QuickLook directly. Picture

Guess what, it's just 1 step to copying madness.

1) Fire up your Terminal and run the following in it (SINGLE LINE).

defaults write com.apple.finder QLEnableTextSelection -bool true; killall Finder

Now, go and copy those words.

[ Optional : I hope you've already enabled QuickLook for all plain text files by now. If not, do that here http://coderwall.com/p/dlithw ]

-- Maybe you'd like to follow me on twitter, I don't make a lot of noise.


  • User-avatar

    Does this only work with Lion?

  • User-avatar


  • A0235bc63a665cf3c08e0ed61e9572ba

    Great tip. Unfortunately, it doesn't work from the command line with qlmanage -p <file> (presumably, because Finder is not involved).

  • E639a491c6cdfd948973dac3847f9f05

    How did you add the ability to open the file with MacVim? I was able to do everything minus the Open with MacVim

  • A7add0ad65caa135b9775e63af32c32e_normal

    Works exactly as described with 10.10.3. Thanks!

  • A0235bc63a665cf3c08e0ed61e9572ba

    Sadly, this great tip no longer works on El Capitan (OS X 10.11) - see http://apple.stackexchange.com/a/212923/28668

Add a comment