Unofficial Hacker News client - receive Push Notifications on replies.

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

313 points by thanato0s 4 days ago | themouseless.dev | 122 comments on HN | Vote on HN (opens Hacker News)

View full thread · View on Hacker News

Comment thread (2)

  1. Regexes are line-based most of the time. And so the more characters you have on the line, the more work the engine has to do to parse it. I guess with greedy quantifiers you need to go to the end of the line and then match from there, and I don't think that's free. Multiply that by the crazy amount of regexes Vim native highlighting uses and the engine begins to struggle.

    That being said, I didn't look at the code of the engine itself, so I don't know for sure. But I know that disabling the highlighting get rid of these kind of issues most of the time.

    Replies (1)
    1. On one hand that makes sense, but the editor knows how much of the line can fit on screen and I don't see why it can't limit the regex to that plus remaining characters before the next whitespace. In theory this could maybe miss some really weird edge case tokens but in reality I don't think it matters.