From 4eee674050f6c77e0aeca76e7bca72aa3d289c93 Mon Sep 17 00:00:00 2001 From: surtur Date: Thu, 6 Oct 2022 16:00:30 +0200 Subject: [PATCH] vimrc: add augroup install_vim_plug --- .vim/vimrc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) 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!