From 7d721d261f18127ae6fb1220ab226d2593db2e7a Mon Sep 17 00:00:00 2001 From: Miao Jiang Date: Tue, 15 Jan 2019 21:33:19 +0800 Subject: [PATCH] Indent line when return --- plugin/auto-pairs.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin/auto-pairs.vim b/plugin/auto-pairs.vim index a79dd4e..e791c42 100644 --- a/plugin/auto-pairs.vim +++ b/plugin/auto-pairs.vim @@ -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"