diff --git a/README.md b/README.md index fb5139c9..85b0d0b9 100644 --- a/README.md +++ b/README.md @@ -102,18 +102,6 @@ proposed change and how it is valuable. Report a bug on [GitHub Issues](https://github.com/pangloss/vim-javascript/issues). -## A Quick Note on Regexes - -Vim 7.4 with patches LESS than 1-7 exhibits a bug that broke how we handle -javascript regexes. Please update to a newer version or run the following -commands to fix: - -``` -:set regexpengine=1 -:syntax enable -``` - - ## License Distributed under the same terms as Vim itself. See `:help license`. diff --git a/ftplugin/javascript.vim b/ftplugin/javascript.vim index 9e2fc9b0..58755a4a 100644 --- a/ftplugin/javascript.vim +++ b/ftplugin/javascript.vim @@ -1 +1,4 @@ setlocal suffixesadd+=.js +if (v:version < 704 || (v:version == 704 && !has('patch002'))) && exists('®expengine') + set re=1 +end