From 4eb5906cb86b1635d23db3027fa2f18e2290f033 Mon Sep 17 00:00:00 2001 From: bounceme Date: Thu, 18 Aug 2016 12:39:59 -0700 Subject: [PATCH 1/8] possible regex improvements --- indent/javascript.vim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/indent/javascript.vim b/indent/javascript.vim index 4b11fdd3..303cf544 100644 --- a/indent/javascript.vim +++ b/indent/javascript.vim @@ -37,7 +37,7 @@ else endfunction endif -let s:line_pre = '^\s*\%(\/\*.\{-}\*\/\s*\)*' +let s:line_pre = '^\s*\%(\%(\/\*.\{-}\)\=\*\+\/\s*\)*' let s:expr_case = s:line_pre . '\%(\%(case\>.\+\)\|default\)\s*:' " Regex of syntax group names that are or delimit string or are comments. let s:syng_strcom = '\%(s\%(tring\|pecial\)\|comment\|regex\|doc\|template\)' @@ -58,14 +58,14 @@ else endfunction endif -let s:line_term = '\%(\s*\%(\/\*.\{-}\*\/\s*\)\=\)\@>$' +let s:line_term = '\%(\s*\%(\/\*\+\%(.\{-}\*\/\)\=\s*\)\=\)\@>$' " configurable regexes that define continuation lines, not including (, {, or [. if !exists('g:javascript_opfirst') - let g:javascript_opfirst = '\%([<>,:?^%|&]\|\([-/.+]\)\%(\1\|\*\|\/\)\@!\|\*\/\@!\|=>\@!\|in\%(stanceof\)\=\>\)' + let g:javascript_opfirst = '\%([<>,:?^%|*&]\|\([-/.+]\)\%(\1\|\/\)\@!\|=>\@!\|in\%(stanceof\)\=\>\)' endif if !exists('g:javascript_continuation') - let g:javascript_continuation = '\%([<=*,.?:^%|&]\|+\@\|\*\@\|\ Date: Thu, 18 Aug 2016 12:49:49 -0700 Subject: [PATCH 2/8] Update javascript.vim --- indent/javascript.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indent/javascript.vim b/indent/javascript.vim index 303cf544..3fbfedae 100644 --- a/indent/javascript.vim +++ b/indent/javascript.vim @@ -62,7 +62,7 @@ let s:line_term = '\%(\s*\%(\/\*\+\%(.\{-}\*\/\)\=\s*\)\=\)\@>$' " configurable regexes that define continuation lines, not including (, {, or [. if !exists('g:javascript_opfirst') - let g:javascript_opfirst = '\%([<>,:?^%|*&]\|\([-/.+]\)\%(\1\|\/\)\@!\|=>\@!\|in\%(stanceof\)\=\>\)' + let g:javascript_opfirst = '\%([<>,:?^%|*&]\|\([-/.+]\)\1\@!\|=>\@!\|in\%(stanceof\)\=\>\)' endif if !exists('g:javascript_continuation') let g:javascript_continuation = '\%([<=,.?/*:^%|&]\|+\@\|\ Date: Thu, 18 Aug 2016 13:23:13 -0700 Subject: [PATCH 3/8] Update javascript.vim --- indent/javascript.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indent/javascript.vim b/indent/javascript.vim index 3fbfedae..0c7581bb 100644 --- a/indent/javascript.vim +++ b/indent/javascript.vim @@ -37,7 +37,7 @@ else endfunction endif -let s:line_pre = '^\s*\%(\%(\/\*.\{-}\)\=\*\+\/\s*\)*' +let s:line_pre = '^\s*\%(\%(\/\*.\{-}\)\=\*\+\/\s*\)\=' let s:expr_case = s:line_pre . '\%(\%(case\>.\+\)\|default\)\s*:' " Regex of syntax group names that are or delimit string or are comments. let s:syng_strcom = '\%(s\%(tring\|pecial\)\|comment\|regex\|doc\|template\)' From 42ccf4d301135a9dfd8a70d63282e4e2421a8a5e Mon Sep 17 00:00:00 2001 From: bounceme Date: Thu, 18 Aug 2016 15:07:26 -0700 Subject: [PATCH 4/8] Update javascript.vim --- indent/javascript.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indent/javascript.vim b/indent/javascript.vim index 0c7581bb..c23ee573 100644 --- a/indent/javascript.vim +++ b/indent/javascript.vim @@ -58,7 +58,7 @@ else endfunction endif -let s:line_term = '\%(\s*\%(\/\*\+\%(.\{-}\*\/\)\=\s*\)\=\)\@>$' +let s:line_term = '\%(\s*\%(\%(\%(\/\*.\{-}\*\/\)\|\%(\/\*\+\)\)\s*\)\=\)\@>$' " configurable regexes that define continuation lines, not including (, {, or [. if !exists('g:javascript_opfirst') From 8f15990e287cce1bf55b2a5cf33ed2bc97647d97 Mon Sep 17 00:00:00 2001 From: bounceme Date: Thu, 18 Aug 2016 15:14:37 -0700 Subject: [PATCH 5/8] Update javascript.vim --- indent/javascript.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indent/javascript.vim b/indent/javascript.vim index c23ee573..c52ec1d9 100644 --- a/indent/javascript.vim +++ b/indent/javascript.vim @@ -58,7 +58,7 @@ else endfunction endif -let s:line_term = '\%(\s*\%(\%(\%(\/\*.\{-}\*\/\)\|\%(\/\*\+\)\)\s*\)\=\)\@>$' +let s:line_term = '\s*\%(\%(\%(\/\*.\{-}\*\/\)\|\%(\/\*\+\)\)\s*\)\=$' " configurable regexes that define continuation lines, not including (, {, or [. if !exists('g:javascript_opfirst') From 5a3e6ec046cf92a27ed03b19eee144fc8414d58e Mon Sep 17 00:00:00 2001 From: bounceme Date: Thu, 18 Aug 2016 15:40:04 -0700 Subject: [PATCH 6/8] Update javascript.vim --- indent/javascript.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indent/javascript.vim b/indent/javascript.vim index c52ec1d9..c0571907 100644 --- a/indent/javascript.vim +++ b/indent/javascript.vim @@ -58,7 +58,7 @@ else endfunction endif -let s:line_term = '\s*\%(\%(\%(\/\*.\{-}\*\/\)\|\%(\/\*\+\)\)\s*\)\=$' +let s:line_term = '\s*\%(\%(\*\+\/\)\=\/\*.\{-}\s*\)\=$' " configurable regexes that define continuation lines, not including (, {, or [. if !exists('g:javascript_opfirst') From 702f02437c1582ca44d46edb8d618b873d919679 Mon Sep 17 00:00:00 2001 From: bounceme Date: Thu, 18 Aug 2016 16:18:47 -0700 Subject: [PATCH 7/8] Update javascript.vim --- indent/javascript.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indent/javascript.vim b/indent/javascript.vim index c0571907..c52ec1d9 100644 --- a/indent/javascript.vim +++ b/indent/javascript.vim @@ -58,7 +58,7 @@ else endfunction endif -let s:line_term = '\s*\%(\%(\*\+\/\)\=\/\*.\{-}\s*\)\=$' +let s:line_term = '\s*\%(\%(\%(\/\*.\{-}\*\/\)\|\%(\/\*\+\)\)\s*\)\=$' " configurable regexes that define continuation lines, not including (, {, or [. if !exists('g:javascript_opfirst') From 1580c68c8b4c4233e25d8392c448cb3a47772564 Mon Sep 17 00:00:00 2001 From: bounceme Date: Thu, 18 Aug 2016 16:37:17 -0700 Subject: [PATCH 8/8] Update javascript.vim --- indent/javascript.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indent/javascript.vim b/indent/javascript.vim index c52ec1d9..321d56f1 100644 --- a/indent/javascript.vim +++ b/indent/javascript.vim @@ -58,7 +58,7 @@ else endfunction endif -let s:line_term = '\s*\%(\%(\%(\/\*.\{-}\*\/\)\|\%(\/\*\+\)\)\s*\)\=$' +let s:line_term = '\s*\%(\%(\/\%(\%(\*.\{-}\*\/\)\|\%(\*\+\)\)\)\s*\)\=$' " configurable regexes that define continuation lines, not including (, {, or [. if !exists('g:javascript_opfirst')