Vim slow with ruby syntax highlighting

后端 未结 7 595
爱一瞬间的悲伤
爱一瞬间的悲伤 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

    I'm using vim 7.4.52 and none of these solutions worked for me.

    According to this github comment on the issue (https://github.com/vim/vim/issues/282#issuecomment-169837021), foldmethod=syntax is responsible for the slowness.

    Adding this to my .vimrc finally fixed it!

    augroup ft_rb
        au!
        " fix the SLOOOW syntax highlighting
        au FileType ruby setlocal re=1 foldmethod=manual
    augroup END
    

提交回复
热议问题