Hacker News new | ask | show | jobs
by alpaca128 7 days ago
I've been tinkering with my own editor on and off and getting its performance to be independent of line length was shockingly easy compared to my expectations based on other editors.

One possible difference is that my syntax highlighting code was only applied on the text that's actually shown on screen and not the entire line. It came with some limitations like multiline string highlighting being broken, but then again I didn't put in much effort to make it work well.

1 comments

By default, Vim stops highlighting after 3000 characters (`help 'synmaxcol'`) but it's often too many. Changing that when opening this kind of file is trivial from the shell:

vim -c 'set synmaxcol=200' my_big_line.xml