From 353c7ec7e1cc33b565feb73201ba19efa5861e0d Mon Sep 17 00:00:00 2001 From: Aaron Riedel Date: Mon, 19 Feb 2024 20:41:48 +0100 Subject: [PATCH] add autoinstaller --- .vimrc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.vimrc b/.vimrc index 959e193..76eab8f 100644 --- a/.vimrc +++ b/.vimrc @@ -1,3 +1,14 @@ +" Install vim-plug if not found +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 +endif + +" Run PlugInstall if there are missing plugins +autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)')) + \| PlugInstall --sync | source $MYVIMRC +\| endif + call plug#begin() Plug 'preservim/nerdtree'