mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 17:40:06 +08:00
Update format function (#4265)
This commit is contained in:
parent
a8d7faf4af
commit
ee730ef00d
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user