I edit a lot of xml files with vim. The problem is that, because of the long lines, navigation/editing in vim is extremely slow. Is there something I can do (besides turning off
Comment out the line
syn sync match xmlSyncDT grouphere xmlDocType +\_.\(
in your xml.vim file (with "
).
This kind of issue can be debugged in a vim session by typing :syntime on
, doing something that demonstrates the slowness of concern, and then :syntime report
. In my case it reported xmlSyncDT
taking over 10 seconds in my 6MB xml file with 4000-character lines just to display the last page of the file. Commenting out the line above has not affected syntax highlighting as far as I've noticed except that it now never takes more than a fraction of a second to display a screen.