mirror of
https://github.com/leafOfTree/vim-vue-plugin.git
synced 2025-12-10 22:51:52 +08:00
Fix Vim built-in javascript indent on closing parenthesis
This commit is contained in:
@@ -200,12 +200,13 @@ function! s:AdjustJavaScriptIndent(ind)
|
|||||||
let curline = getline(v:lnum)
|
let curline = getline(v:lnum)
|
||||||
|
|
||||||
" Fix Vim built-in javascript indent
|
" Fix Vim built-in javascript indent
|
||||||
if prevline =~? '\w\+(\s*$'
|
if prevline =~ '\w\+(\s*$'
|
||||||
call vue#LogWithLnum('previous line is a function call, this line is its first arg')
|
call vue#LogWithLnum('previous line is a function call, this line is its first arg')
|
||||||
let prevind = indent(prevlnum)
|
let ind = indent(prevlnum) + &sw
|
||||||
if ind == prevind
|
endif
|
||||||
let ind = prevind + &sw
|
if curline =~ '^\s*);\?\s*$'
|
||||||
endif
|
call vue#LogWithLnum('this line is the closing parenthesis of the function call')
|
||||||
|
let ind = indent(prevlnum) - &sw
|
||||||
endif
|
endif
|
||||||
return ind
|
return ind
|
||||||
endfunction
|
endfunction
|
||||||
|
|||||||
Reference in New Issue
Block a user