mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-03-23 17:49:57 +08:00
Update format function (#4265)
This commit is contained in:
parent
a8d7faf4af
commit
ee730ef00d
@ -68,6 +68,12 @@ endfunction
|
|||||||
function! s:format() abort
|
function! s:format() abort
|
||||||
if !empty(&ft) &&
|
if !empty(&ft) &&
|
||||||
\ ( index(s:format_ft, &ft) !=# -1 || s:format_on_save ==# 1)
|
\ ( 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
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
Loading…
x
Reference in New Issue
Block a user