Your example seems to work: I see the \getbuffer[MyBuffer] command typed (not executed) with colour coding on the keyword and line numbered; then the block text fakewords from the visual module; then the \fakewords macro shown (again not executed) as per the default for typing. What were you exepcting if not this? (onTeXt ver: 2023.07.18 22:07 LMTX)
On 29 Jul 2023, at 20:09, Henning Hraban Ramm
wrote: Hi, I’d like to use a custom buffer ("MyBuffer") to use a custom typing style ("MyCode"). How does that work?
""" \usemodule[visual]
\definetyping[MyCode]
\setuptyping[MyCode][ option=tex, numbering=file, ]
\definebuffer[MyBuffer]
\startMyBuffer \fakewords{10}{20} \stopMyBuffer
\starttext
\startMyCode \fakeword \stopMyCode
\getMyBuffer
\typeMyBuffer
\stoptext """
— Bruce Horrocks Hampshire, UK