From 5cadf120356491c1d8e5e8ee6c77fbcf3effa6d6 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 1 Dec 2020 18:59:46 -0500 Subject: [PATCH] Run plug#end before checking g:plugs. https://github.com/junegunn/vim-plug/issues/1039 --- tips.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tips.md b/tips.md index a9a3fd6..efa7dcf 100644 --- a/tips.md +++ b/tips.md @@ -31,8 +31,15 @@ if empty(glob('~/.vim/autoload/plug.vim')) \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim endif +call plug#begin() +if exists('g:loaded_plug') + // Uncommment the following line to install documentation + // Plug 'junegunn/vim-plug' + call plug#end() +endif + " Run PlugInstall if there are missing plugins -if len(filter(values(g:plugs), '!isdirectory(v:val.dir)')) +if exists('g:plugs') && len(filter(values(g:plugs), '!isdirectory(v:val.dir)')) autocmd VimEnter * PlugInstall --sync | source $MYVIMRC endif ```