Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: