diff options
| author | jdhao <jdhao@hotmail.com> | 2021-11-23 22:39:43 +0800 |
|---|---|---|
| committer | jdhao <jdhao@hotmail.com> | 2021-11-23 22:43:12 +0800 |
| commit | 19cf6cca3c710b7ba68bdf49327ac9c295225e21 (patch) | |
| tree | ec9d104698b73baf25bb9abbf10344b8b3085b8d /autoload | |
| parent | f996edf016e289051a518e5c8b106a8aebd77400 (diff) | |
refactor theme loading
Diffstat (limited to 'autoload')
| -rw-r--r-- | autoload/utils.vim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/autoload/utils.vim b/autoload/utils.vim index 891ab78..8486773 100644 --- a/autoload/utils.vim +++ b/autoload/utils.vim @@ -193,3 +193,14 @@ function! utils#MultiEdit(patterns) abort endfor endfor endfunction + +function! utils#add_pack(name) abort + let l:success = v:true + try + execute printf("packadd! %s", a:name) + catch /^Vim\%((\a\+)\)\=:E919/ + let l:success = v:false + endtry + + return l:success +endfunction |
