We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d2fa176 commit 617ccb5Copy full SHA for 617ccb5
indent/javascript.vim
@@ -70,7 +70,7 @@ let s:one_line_scope_regex = '\%(\%(\<else\>\|\<\%(if\|for\|while\)\>\s*(\%([^()
70
" Regex that defines blocks.
71
let s:block_regex = '\%([{([]\)\s*\%(|\%([*@]\=\h\w*,\=\s*\)\%(,\s*[*@]\=\h\w*\)*|\)\=' . s:line_term
72
73
-let s:operator_first = '^\s*\%([*.:?]\|\([/-+]\)\1\@!\|||\|&&\)'
+let s:operator_first = '^\s*\%([*.:?]\|\([-/+]\)\1\@!\|||\|&&\)'
74
75
let s:var_stmt = '^\s*\%(const\|let\|var\)'
76
@@ -330,6 +330,7 @@ function GetJavascriptIndent()
330
return cindent(v:lnum)
331
endif
332
333
+ " cindent each line which has a switch label
334
if (line =~ s:expr_case)
335
336
0 commit comments