Skip to content

Commit af37b22

Browse files
bouncemebounceme
authored andcommitted
[-+] not by another
1 parent 3e13731 commit af37b22

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

indent/javascript.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ let s:skip_expr = "synIDattr(synID(line('.'),col('.'),1),'name') =~ '".s:syng_st
6363
let s:line_term = '\s*\%(\%(\/\/\).*\)\=$'
6464

6565
" Regex that defines continuation lines, not including (, {, or [.
66-
let s:continuation_regex = '\%([\\*+/.:]\|\%(<%\)\@<![=-]\|\W[|&?]\|||\|&&\|[^=]=[^=>].*,\)' . s:line_term
66+
let s:continuation_regex = '\%([\\*/.:]\|+\@<!+\|-\@<!-\|\%(<%\)\@<!=\|\W[|&?]\|||\|&&\|[^=]=[^=>].*,\)' . s:line_term
6767

6868
" Regex that defines continuation lines.
6969
" TODO: this needs to deal with if ...: and so on
@@ -74,7 +74,7 @@ let s:one_line_scope_regex = '\%(\%(\<else\>\|\<\%(if\|for\|while\)\>\s*(\%([^()
7474
" Regex that defines blocks.
7575
let s:block_regex = '\%([{([]\)\s*\%(|\%([*@]\=\h\w*,\=\s*\)\%(,\s*[*@]\=\h\w*\)*|\)\=' . s:line_term
7676

77-
let s:operator_first = '^\s*\%([-*/+.:?]\|||\|&&\)'
77+
let s:operator_first = '^\s*\%([*/.:?]\|\([-+]\)\1\@!\|||\|&&\)'
7878

7979
let s:var_stmt = '^\s*\%(const\|let\|var\)'
8080

0 commit comments

Comments
 (0)