From ee730ef00d0360241be4b99a3e5b420d20244757 Mon Sep 17 00:00:00 2001 From: Wang Shidong Date: Thu, 20 May 2021 06:42:51 +0800 Subject: [PATCH] Update format function (#4265) --- autoload/SpaceVim/layers/format.vim | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/autoload/SpaceVim/layers/format.vim b/autoload/SpaceVim/layers/format.vim index 1839b73ba..8437d61a9 100644 --- a/autoload/SpaceVim/layers/format.vim +++ b/autoload/SpaceVim/layers/format.vim @@ -68,6 +68,12 @@ endfunction function! s:format() abort if !empty(&ft) && \ ( index(s:format_ft, &ft) !=# -1 || s:format_on_save ==# 1) - try | undojoin | Neoformat | catch /^Vim\%((\a\+)\)\=:E790/ | finally | silent Neoformat | endtry + try + undojoin + Neoformat + catch /^Vim\%((\a\+)\)\=:E790/ + finally + silent Neoformat + endtry endif endfunction