2

I have installed the QLColorCode plugin from this site, so that I can Quick Look JavaScript and CSS files, but it's not working. Pressing the space bar on a code file just shows the icon.

Removing the plugin has no effect either.

Is there another way to Quick Look source code files in macOS?

1
  • Kindly edit the question and specify how did you install the plugin? Manually or via Homebrew? What is the version of macOS that you are using? What do you mean by Removing the plugin has no effect either.
    – Nimesh Neema
    Commented Sep 20, 2018 at 13:49

3 Answers 3

3

You don't need any 3rd plugin plugins to Quick Look source code/ASCII text files. Invoking Quick Look by pressing the spacebar on JavaScript/CSS source code file (which are plain text ASCII encoded) will show you the plain source code text.

Here's what QuickLook shows when invoking Quick Look on a JavaScript file named callback.js:

enter image description here

Installing QLColorCode using Homebrew by running brew cask install qlcolorcode and invoking Quick Look on the same file immediately thereafter shows this color coded output:

enter image description here

Follow the installation instructions on the project homepage to make sure your have correctly installed the plugin:

This is a Quick Look plugin that renders source code with syntax highlighting, using the Highlight library.

To install Highlight, download the library manualy, or use homebrew brew install highlight

To install the plugin, just drag it to ~/Library/QuickLook. You may need to create that folder if it doesn't already exist.

Alternative, if you use Homebrew-Cask, install with brew cask install qlcolorcode.

1

I've just trued using QuickLook on a .js file with Espresso installed and I saw the code, with syntax colouring included. You can get Espresso from https://www.espressoapp.com/ I personally use TextMate from Macromates

0

I had the same problem and fixed it by installing highlight which qlcolorcode depends on:

brew install highlight

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .