Indent line when return

This commit is contained in:
Miao Jiang 2019-01-15 21:33:19 +08:00
parent 423ee192c7
commit 7d721d261f

View File

@ -336,7 +336,8 @@ func! AutoPairsReturn()
let after = getline('.')
let cmd = ''
for [open, close] in b:AutoPairsList
if before =~ '\V'.open.'\v\s*$' && after =~ '^\s*\V'.close
" before =~ '\V'.open.'\v\s*$' &&
if after =~ '^\s*\V'.close
if g:AutoPairsCenterLine && winline() * 3 >= winheight(0) * 2
" Recenter before adding new line to avoid replacing line content
let cmd = "zz"