Vim slow with ruby syntax highlighting

后端 未结 7 577
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-12 16:59

I\'ve been using vim over ssh to work for a week or two now and all has been going great. Today I decided to add in some syntax highlighting, autocomplete, and some other ge

7条回答
  •  伪装坚强ぢ
    2020-12-12 17:46

    The solution to this problem turned out to be the regex engine that vim uses. The speculation on #vim on freenode is that the ruby syntax files use something that is slower on the new regex engine.

    Any version older than and including Vim 7.3.969 has the old regex engine. Add in set re=1 to your vimrc to force the old regex engine on any version newer (and don't forget to reload the file you're currently editing with :e).

    Thanks to Houl, Dolio and dmedvinsky from #vim for help figuring it out.

    I haven't had a chance to try the absolute latest version, there was a commit last night that may help with this issue. I will update this if I get the chance to try the bleeding edge version again.

提交回复
热议问题