I've been thinking of writing an extensible editor scriptable with Tcl, but - surely someone somewhere must have already written one, no? I couldn't find anything that wasn't just a toy.

I suspect there are a great many, Tcl/Tk makes it a very easy project but once you start using your editor to edit the code for your editor you realize you can edit your editor while you edit in it without restarting. Couple weeks later you have an editor filled with undocumented features and a weird skew towards editing the languages you use most and tailored to your personal coding quirks and style.

At least that is how it went for me. Once I got basic functionality working it turned into something that evolves instead of being written; working on some project and realize a certain feature would be great, open editor's built in console and write a few procs, send it to the interpreter, test, save, continue on with other project, fully intend to document and improve/generalize later, repeat until it turns into something only you can use.

[tcl'ers wiki page on tcl editors](https://wiki.tcl-lang.org/page/Tcl+Editors)

An interesting one I hacked around with for a while is [ma](https://github.com/kdltr/ma). It's a single window implementation of an acme-like editor. It was originally written (& still used by) Felix Winkleman, the creator of chicken scheme

Vim is scriptable with TCL: https://vimhelp.org/if_tcl.txt.html

There have been a few but I think they're all dead these days.

Alphatk for example: https://en.wikipedia.org/wiki/Alphatk

BBEdit started in the 90s and was an early adopter for TCL extensibility.

This is a really interesting idea, and I don't know why I haven't seen one—it seems like such an obviously good idea.