0

My experience is that Vim is slow when searching in large XML files with syntax highlighting turned on. I find it to be very dissatisfactory. I have read about the issue elsewhere but I have not been able to locate a solution. Does someone know how to treat the issue?

  • How large of a file are you talking about? – Herb Wolfe Mar 19 '17 at 17:26
  • 40-50 megabytes, for instance. – Birdie Mar 20 '17 at 22:07
  • Any text editor is going to be slow, searching in a file that large, if they can even open it. – Herb Wolfe Mar 20 '17 at 22:32
  • Yes, but Sublime Text and Atom opens the same files noticeably faster. And that confuses me. – Birdie Mar 25 '17 at 15:27
2

Not a real solution, but it helps loading bigger XML files with long lines. This restricts the syntax hightlighting to a line width and everything after this is not highlighted. In this example there is no hightlighting after the 100th char.

:set synmaxcol=100

Or just disable syntax highlighting completely

:syntax off

(Enable with :syntax on)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.