diff --git a/.vim/vimrc b/.vim/vimrc index f6bb8c2..0e74f17 100644 --- a/.vim/vimrc +++ b/.vim/vimrc @@ -8,11 +8,14 @@ scriptencoding=utf8 filetype off "required -if empty(glob('~/.vim/autoload/plug.vim')) - silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs - \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim - autocmd VimEnter * PlugInstall --sync | source $MYVIMRC -endif +augroup install_vim_plug + autocmd! + if empty(glob('~/.vim/autoload/plug.vim')) + silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs + \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim + autocmd VimEnter * PlugInstall --sync | source $MYVIMRC + endif +augroup END augroup plug_auto_install autocmd!