We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b53274d commit 91314f3Copy full SHA for 91314f3
1 file changed
indent/javascript.vim
@@ -83,8 +83,8 @@ endfunction
83
" https://github.com/sweet-js/sweet.js/wiki/design#give-lookbehind-to-the-reader
84
function s:IsBlock()
85
return getline(line('.'))[col('.')-1] == '{' && !search(
86
- \ '\C\%(\<return\s*\|\%([-=~!<*+,.?^%|&\[(]\|=\@<!>\|\*\@<!\/\|\<\%(var\|const\|let\|import\|export\%(\_s\+default\)\=\|yield\|delete\|void\|t\%(ypeof\|hrow\)\|new\|in\%(stanceof\)\=\)\)\_s*\)\%#','bnW') &&
87
- \ (!search('[:{]\_s*\%#','bW') || (!s:GetPair('[({[]','[])}]','cbW',200) || s:IsBlock()))
+ \ '\C\%(\<return\s*\|\%([-=~!<*+,.:?^%|&\[(]\|=\@<!>\|\*\@<!\/\|\<\%(var\|const\|let\|import\|export\%(\_s\+default\)\=\|yield\|delete\|void\|t\%(ypeof\|hrow\)\|new\|in\%(stanceof\)\=\)\)\_s*\)\%#','bnW') &&
+ \ (!search('{\_s*\%#','bW') || s:IsBlock())
88
endfunction
89
90
" Auxiliary Functions {{{2
0 commit comments