diff --git a/plugin/commands.vim b/plugin/commands.vim index 2fc7fd2..8e27a0c 100644 --- a/plugin/commands.vim +++ b/plugin/commands.vim @@ -1,10 +1,10 @@ " minpac command! PackUpdate packadd minpac | source $MYVIMRC | - \ call minpac#update('', {'do': 'call minpac#status()'}) + \ call minpac#init() | call minpac#update('', {'do': 'call minpac#status()'}) command! PackStatus packadd minpac | source $MYVIMRC | - \ call minpac#status() + \ call minpac#init() | call minpac#status() command! PackClean packadd minpac | source $MYVIMRC | - \ call minpac#clean() + \ call minpac#init() | call minpac#clean() " Sort Python Imports command! ISort call do#isort() diff --git a/vimrc b/vimrc index 25f7087..fb2d5a8 100644 --- a/vimrc +++ b/vimrc @@ -12,8 +12,7 @@ if has('syntax') && !exists('g:syntax_on') endif if exists('*minpac#init') - " When minpac is loaded initialize and define the Pack command. - call minpac#init() + " When minpac is loaded define the Pack command to add packages. command! -nargs=+ Pack call minpac#add() else " Otherwise define the Pack command to do nothing. @@ -203,11 +202,11 @@ Pack 'jrozner/vim-antlr' Pack 'greymd/oscyank.vim', {'type': 'opt'} let g:use_osc52 = $TMUX !=# '' && \ trim(system('tmux show-options -g set-clipboard')) ==# 'set-clipboard on' -if g:use_osc52 +if g:use_osc52 && isdirectory('pack/minpac/opt/oscyank.vim') packadd oscyank.vim endif " Load YouComplteMe if termdebug plugin is not loaded. -if !exists(':Termdebug') +if !exists(':Termdebug') && isdirectory('pack/minpac/opt/YouCompleteMe') packadd YouCompleteMe endif