HerringtonDarkholme / yats.vim

Yet Another TypeScript Syntax: The most advanced TypeScript Syntax Highlighting in Vim
Vim License
648 stars 68 forks source link

Old regexpengine causes redrawtime exceeded #135

Open adrigzr opened 4 years ago

adrigzr commented 4 years ago

When having the following settings on vimrc:

syntax on
set regexpengine=1

And opening the following file:

function lala(files, options) {
  const outputDir = path.join(this.options.cwd, options.output);
}

With the command:

$ vim -N -u vimrc file.ts    

Vim is very slow opening the file and after some time throws: 'redrawtime' exceeded, syntax highlighting disabled

leibowitz commented 3 years ago

The readme mentions explicitely to set the regex engine via set re=0

Note: set re=0 explicitly in your vimrc. Old regexp engine will incur performance issues for yats and old engine is usually turned on by other plugins.

Source: https://github.com/HerringtonDarkholme/yats.vim#config

BTW, when talking about old regex engine, I'm not sure how old it is. If this article is related, it would be pre-dating 2010... and that would be pretty old indeed.