An unofficial, read-only Hacker News reader.

Show HN: I wrote an entire Vim manual over 4 years (opens external site)

311 points by thanato0s 2 days ago | themouseless.dev | 118 comments on HN

View full thread · View on Hacker News

Comment thread (1)

  1. I don’t know how the highlight engine is coded, but I do know that it’s regex based. You moslty have to try every regex on every line. And for some lines you have to try it more than once (think tags).

    When it doesn’t match, it’s ok. When it does match you jave to create new structures, adjust their priorities. And for the renderer, every scrolling means reissuing the ansi excape code according to some theme.

    All of this are probably bound to the number n of characters in a line. And for big n, that means a lot of operations. Emacs also struggle with long lines.