Optimizing Syntax Coloring with Code Mirror (original) (raw)
Whats the reason that Code Mirror is judged limited?
Just noticed that SWI-Tinker and XPCE use different
Syntax Coloring strategies. Especially when it comes to the
delayed re-coloring of text. Editing inside a block comment:
XPCE, less noisy:
SWI-Tinker, extremly noisy:
SWI-Tinker does place a orange caret, and invalidates
the coloring of the clause below. Only after a delay it corrects
the error. Possibly a discrepancy between incremental coloring
and full coloring. How would Code Mirror scale in terms of user
experience and file size. Is it much different from Electron? They
probably use the same techniques, there is nothing else…
Edit 07.08.2025
Interestingly browsers are quite in flux. There is now a new
property value “plaintext-only” for the property name “contenteditable”,
Firefox for Android adopted it wth Release 136, from 2025-03-04.
so one can do without Code Mirror at all, for most of the time,
I am keeping on exploring this idea. From a recent trial,
combining bind/4 with call_later/3 and timer_cancel/1:
Dogelog, less noisy: