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?

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

1 Answer 1

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 and acknowledge you have read our privacy policy.

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