From 09288d9e5ac71f1841fd813da455037d071f064c Mon Sep 17 00:00:00 2001 From: bounceme Date: Thu, 26 May 2016 14:44:48 -0700 Subject: [PATCH 1/2] change the regex engine according to warning --- README.md | 12 ------------ 1 file changed, 12 deletions(-) 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`. From b440d1ec63a01313b2193411217de4f0f32b6015 Mon Sep 17 00:00:00 2001 From: bounceme Date: Thu, 26 May 2016 14:46:16 -0700 Subject: [PATCH 2/2] Update javascript.vim --- ftplugin/javascript.vim | 3 +++ 1 file changed, 3 insertions(+) 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