Install the app and run it. This will register the availability of the app’s QuickLook extensions, Code Previewer and Code Thumbnailer. You can now quit the app — just click Quit:
To use QuickLook in Finder, select a source code file and press space. This will pop up a rendered preview of the file, using a dark theme…
…or a light theme…
…the choice is yours — make your selection in the main app’s Preferences panel.
You’ll also get source code file previews in Finder’s preview pane, enabled using View > Show Preview or by hitting Cmd-Shift-P. PreviewCode enables syntax highlighted previews in the Preview: section of Finder’s file info panel (select a file and hit Cmd-I), too.
You can disable or re-enable Code Previewer and/or Code Thumbnailer in System Preferences > Extensions:
.actionscript
).ads
, .adb
).applescript
).arduino
, .ino
).basic
, .bas
).brainfuck
, .b
, .bf
).c
, .h
).cpp
, .hpp
).csx
, .cs
, .c-sharp
).clojure
, .clj
, .cljs
, .cljc
).coffee
).dart
).elxir
, .ex
, .exs
).erlang
, .erl
, .hrl
).for
).f-sharp
, .fsx
, .fsi
, .fsscript
).go
).haskell
, .hs
, .lhs
).java
).js
).julia
, .jl
).kotlin
, .kt
, .kts
, .ktm
).lisp
, .lsp
, .fasl
).lua
).m
).pas
).perl
).php
).py
).rb
).rs
, .rust
).swift
).typescript
, .tsx
).vbscript
, .vbs
).sh
).csh
).ksh
).tsch
).zsh
).s
).asm
, .nasm
).plist
).adoc
, .asciidoc
, .asc
).conf
, .cf
, .cfg
, .ini
, .rc
).cmake
).css
).env
).latex
, .tex
)makefile
) New.proto
).scss
, .sass
).sql
).tf
, .terraform
).tfvars
).twig
)Open the Preferences panel from the main app’s PreviewCode menu, by hitting Command-,, or by clicking the Show Preview Preferences button. This Preferences panel allows you to adjust some of the key elements of the preview:
Pick your theme from the list — click on a theme or its name to select it. Use the selector above the list to view only dark or light themes, or to view all of them:
Choose your preferred text size using the slider, then pick the monospace font you want the file to be presented in:
You can also choose each font’s style:
Click Save to apply your choices.
Changing these settings will affect previews straight away.
You can use the main app to submit feedback. Just click in the Send Feedback button in the main app, or select Report a Bug… from its Help menu:
Please include your email address if you would like a response. I can’t respond without one. Please see the privacy policy for details of email address usage.
If it appears that either Code Previewer or Code Thumbnailer are not working after you have run the host app, please log out of your Mac and then log back in.
.edn
files. This is because the .edn
file extension is pre-set on macOS to an Adobe digital rights management product. We are investigating possible workarounds..ts
files. This is because the .ts
file extension is a standard for transport stream video files. Workaround: use .tsx
for TypeScript files.If you have found PreviewCode to be useful, please consider writing a positive review on the Mac App Store, or simply give it a rating.
Thank you!
PreviewCode makes use of code from the following sources:
You can view PreviewCode’s source code at GitHub.
com.microsoft.c-sharp
UTI.
.plist
).
public.lua-script
UTI.
.cs
C# extension.
.env
files.
.cmake
files.
.tfvars
files.
.adoc
, .asciidoc
and .asc
files.
.conf
, .cf
, .cfg
, .ini
and .rc
config files
.hsl
extension.
.nasm
preview.
.actionscript
to avoid clash with AppleSingle .as
.
.cl
— clash with OpenCL source.
.l
— clash with Lex source.
.fs
— clash with OpenGL Fragment Shader source.
.dylan
and .lid
extensions.
.tf
files.