Syntax Highlighting In Quick Look

Press Space on a script and read it highlighted, with line numbers

  • Works without the Space helper
  • Free and open source
  • macOS 13+
queue.ts
The demo’s src/queue.ts, highlighted with line numbers: drawn in HTML, not a screenshot.

Quick Look shows a Python, Go or shell script as plain text at best, or just an icon. spacebar takes Space for code and shows it highlighted, with line numbers, beside the folder. Spot a typo? Click and fix it.

Install It

Download for Mac

Or paste this in Terminal

curl -fsSL https://spacebar.patebryant.com/install.sh | sh

The script downloads the latest notarized release from GitHub, checks its SHA-256 and installs to ~/Applications, no sudo. Read the script.

Press Space On A Script

  1. Select a source file, script or config in Finder.
  2. SpaceIt opens highlighted, the folder in the sidebar.
  3. ↑ ↓Click the next file, or move with the arrow keys.

What It Highlights

Languages with no bundled grammar, such as Dart, Elixir, Haskell and Zig, show as plain text with line numbers, as do .ps1, .bat, .conf, .env, logs and dotfiles such as .gitignore. A Dockerfile, nginx configuration, Scala and Terraform are highlighted.

Over 2 MB, the first 2 MB. Scripts are never run; Open sends one to your editor, never Terminal.

Find, Copy And Fix A Line

When Space Shows Something Else

Compared: Syntax Highlight, Glance, other apps. Files with no extension: after QLStephen. Every type: file types. PDFs and photos too: the Space helper, a Quick Look replacement.