From b59cdeb9aec97eb1e98fe79ff2e32dd1b06b5273 Mon Sep 17 00:00:00 2001 From: adam <56338480+adastx@users.noreply.github.com> Date: Sat, 13 Aug 2022 09:53:51 +0200 Subject: vim: bootstrap vim-plug --- .config/vim/vimrc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to '.config/vim') diff --git a/.config/vim/vimrc b/.config/vim/vimrc index ba20715..8a0207e 100644 --- a/.config/vim/vimrc +++ b/.config/vim/vimrc @@ -15,7 +15,16 @@ set directory=$XDG_CACHE_HOME/vim/swap | call mkdir(&directory, 'p') set undodir=$XDG_CACHE_HOME/vim/undo | call mkdir(&undodir, 'p') set undofile -call plug#begin('~/.config/vim/plugged') +let data_dir = '$XDG_DATA_HOME/vim' +if empty(glob(data_dir . '/autoload/plug.vim')) + silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' +endif + +autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)')) + \| PlugInstall --sync | source $MYVIMRC +\| endif + +call plug#begin(data_dir . '/plugged') Plug 'romgrk/doom-one.vim' Plug 'tpope/vim-surround' Plug 'tpope/vim-commentary' -- cgit v1.2.3-70-g09d2