Skip to content

Commit 53f843b

Browse files
authored
shorten s:var names
1 parent 4ee476b commit 53f843b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

indent/javascript.vim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ function s:Trimline(ln)
7474
endfunction
7575

7676
" configurable regexes that define continuation lines, not including (, {, or [.
77-
let s:javascript_opfirst = '^' . get(g:,'javascript_opfirst',
77+
let s:opfirst = '^' . get(g:,'javascript_opfirst',
7878
\ '\%([<>,?^%|*&]\|\/[/*]\@!\|\([-.:+]\)\1\@!\|=>\@!\|in\%(stanceof\)\=\>\)')
79-
let s:javascript_continuation = get(g:,'javascript_continuation',
79+
let s:continuation = get(g:,'javascript_continuation',
8080
\ '\%([<=,.?/*^%|&:]\|+\@<!+\|-\@<!-\|=\@<!>\|\<in\%(stanceof\)\=\)') . '$'
8181

8282
function s:OneScope(lnum,text)
@@ -254,7 +254,7 @@ function GetJavascriptIndent()
254254
\ float2nr(str2float(matchstr(&cino,'.*:\zs[-0-9.]*')) * (&cino =~# '.*:[^,]*s' ? s:W : 1))
255255

256256
" most significant, find the indent amount
257-
let isOp = l:line =~# s:javascript_opfirst || pline !~# s:expr_case . '$' && pline =~# s:javascript_continuation
257+
let isOp = l:line =~# s:opfirst || pline !~# s:expr_case . '$' && pline =~# s:continuation
258258
let bL = s:iscontOne(l:lnum,num,isOp)
259259
let bL -= (bL && l:line =~ '^{') * s:W
260260
if isOp && (!num || bchar && cursor(b:js_cache[1],b:js_cache[2])+1 && s:IsBlock())

0 commit comments

Comments
 (0)