Vim with Rust syntax highlighting enabled slow


#1

Hi,

Is it only me, or in Vim with the syntax highlighting enabled for Rust, whole Vim gets slow? As soon as I do :syntax off, slowness disappear. I don’t have such problems with other file formats.


#2

It’s not just you.

Sometimes it seems like it just hangs for a second or two. Especially when adding new stuff near the bottom of a longer file.


#3

I too have noticed this. The larger the file, the more sluggish it becomes.


#4

I haven’t encountered this in Rust yet since I’m not yet working on large files, but I had the same problem in vim with python syntax highlighting (also fast after :syntax off. I switched to NeoVim for this reason, this fixed the performance problem of the python syntax highlighting. May be NeoVim has a faster scripting or RegEx engine underneath, not sure.