1. Enable QuickLook for all plain text file with QLStephen
  2. Open Terminal and run following code: > defaults write com.apple.finder QLEnableTextSelection -bool true; killall Finder
  3. Done.

via 1, 2