Hacker News new | ask | show | jobs
by kbenson 1854 days ago
I added 'autocmd BufEnter * syntax sync minlines=4000' to my .vimrc to make it buffer more of large files initially, so it gets less confused when you reopen a file and it resumes at a prior location deep inside and has no syntax highlighting.

I guess fromstart would work as well, but is probably best manually run like you do so a very large file doesn't bring the system to a halt.

1 comments

That's why that happens, and a fix - thanks!