better error handling

This commit is contained in:
lilydjwg 2020-12-23 15:40:21 +08:00
parent 056f8c580d
commit d619809504
2 changed files with 9 additions and 4 deletions

View file

@ -12,9 +12,11 @@ let s:keepcpo = &cpo
set cpo&vim
let g:loaded_fcitx = 1
exe 'py3file' expand('<sfile>:r') . '.py'
au InsertLeave * py3 fcitx2en()
au InsertEnter * py3 fcitx2zh()
try " abort on fail
exe 'py3file' expand('<sfile>:r') . '.py'
au InsertLeave * py3 fcitx2en()
au InsertEnter * py3 fcitx2zh()
endtry
" ---------------------------------------------------------------------
" Restoration And Modelines:
let &cpo=s:keepcpo