One of those things I missed the most when I had to switch back to a Windows machine at work was access to anything similar to Quick Look on OS X.
Hard to overstate how incredibly useful it is to be able quick look into source code files, including drupal extensions like .module and .inc. Viewing markdown with a spacebar click and the contents of a zip file, before unzipping, is really nice.
Recently I upgraded to OS X Sierra and all of my Quick Look plugins disappeared. There are about a million different quick look plugins available out there but here’s the list of plugins I’ve got running:
You can install these with the following snippets if you have brew installed. Note that you might need to install the cask version of a few of these if you get a warning that one of them doesn’t exist.
brew install Caskroom/cask/betterzipql
brew install qlImageSize
brew install Caskroom/cask/qlmarkdown
brew install wget && wget https://github.com/BrianGilbert/QLColorCode-extra/archive/master.zip
unzip master.zip && mv QLColorCode-extra-master/QLColorCode.qlgenerator ~/Library/QuickLook/
A couple of things that tripped me up.
qlcolorcodedefaults to a theme that is no longer provided so you have to set the theme with the following command:
defaults write org.n8gray.QLColorCode hlTheme acid
You can see some of the other themes available here (note - not all of them work): http://www.andre-simon.de/doku/highlight/en/highlight.php
I also wanted to see the line numbers and set the base font to
Monaco. Here is the list of settings I’m using:
defaults write org.n8gray.QLColorCode textEncoding UTF-16 defaults write org.n8gray.QLColorCode webkitTextEncoding UTF-16 defaults write org.n8gray.QLColorCode font Monaco defaults write org.n8gray.QLColorCode extraHLFlags '-l -W' defaults write org.n8gray.QLColorCode hlTheme acid
The above config looks like this: