From bbd642af1a8c27a3ea3a5af37272928230db40ab Mon Sep 17 00:00:00 2001 From: jdhao Date: Wed, 15 Dec 2021 00:21:34 +0800 Subject: [PATCH] renaming variables --- autoload/utils.vim | 6 +++--- core/themes.vim | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/autoload/utils.vim b/autoload/utils.vim index d9a8a32..8f528fb 100644 --- a/autoload/utils.vim +++ b/autoload/utils.vim @@ -193,12 +193,12 @@ function! utils#MultiEdit(patterns) abort endfunction function! utils#add_pack(name) abort - let l:success = v:true + let l:status = v:true try execute printf("packadd! %s", a:name) catch /^Vim\%((\a\+)\)\=:E919/ - let l:success = v:false + let l:status = v:false endtry - return l:success + return l:status endfunction diff --git a/core/themes.vim b/core/themes.vim index ced7384..87e29cc 100644 --- a/core/themes.vim +++ b/core/themes.vim @@ -61,7 +61,7 @@ let s:theme2dir = { \ 'nord': 'nord.nvim', \ 'doom_one': 'doom-one.nvim', \ 'everforest' :'everforest', - \ 'nightfox': 'nightfox.nvim' + \ 'nightfox': 'nightfox.nvim', \ } let s:theme = utils#RandElement(keys(s:theme2dir)) @@ -73,8 +73,8 @@ if !has_key(s:theme_setup_dict, s:theme) finish endif -let s:res = utils#add_pack(s:theme2dir[s:theme]) -if !s:res +let s:status = utils#add_pack(s:theme2dir[s:theme]) +if !s:status echomsg printf("Theme %s not installed. Run PackerSync to install.", s:theme) finish endif