In situ Syntax Highlighting in macOS Applications Like Keynote
Eric Meyer · 2026年6月17日
Earlier this month, I returned to CSS Day for the first time since
2018 to deliver my first in-person talk since 2022. “Forging Our Own
Paths” should be available at some point; in the meantime, for the six or
seven people in my audience who might need to do something similar, I’d
like to share a small macOS workflow I developed to make syntax-highlighting
code blocks in situ in Keynote a lot simpler. The
end result is to have an entry (or entries) in the Services submenu of
the contextual (right-click) menu for highlighted text. All this is adapted from an old blog
post I found copied in a few places, and which needed some updates to
make things work in 2026.
This is what it looks like for me. It could look much the same for you!
First, install highlight. I used brew install highlight, and the rest of this piece assumes you’ve done it that way. If you install it another way, such that it ends up in a different location than Homebrew would give it, you’ll need to modify a variable value later on, which I’ll point out when we get there.
继续阅读全文
为了尊重作者,这里只展示开头几段。你可以去原文阅读,或者在 HorizonReader 里读:划线做笔记、让 AI 帮忙。
The proposal period for Interop 2027 closed in late September, which means the Interop team is now in the process of working through all the proposals and ultimately deciding which will be taken on next year. Part of that process is looking
Today is very much like it was twelve years ago, warm but not hot and cool in the shade, the sky a kind of clear you don’t often get in Cleveland. It felt that way from dawn, and when I went back to check the weather for June 7, 2014, which
My colleague Chris Griffith, with whom I collaborated to put The Effects of Nuclear Weapons, Third Edition (1977) online, is also a spaceflight enthusiast (and an urban trails hiker: check out his new book!). He recently asked me how I woul
Over the years, I’ve created an experiment or two that drew stuff to a <canvas> element: a wave function collapse experiment here, a crystallizing palette there. After a while, I found a way to wire up a button so that clicking it would sav
I’ve long made it clear that I don’t particularly care for the whole Shadow DOM thing. I believe I understand the problems it tries to solve, and I fully acknowledge that those are problems worth solving. There are just a bunch of things ab