From 19cf6cca3c710b7ba68bdf49327ac9c295225e21 Mon Sep 17 00:00:00 2001 From: jdhao Date: Tue, 23 Nov 2021 22:39:43 +0800 Subject: refactor theme loading --- autoload/utils.vim | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'autoload') 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 -- cgit v1.2.3