diff options
author | adam <56338480+adastx@users.noreply.github.com> | 2022-08-13 09:53:51 +0200 |
---|---|---|
committer | adam <56338480+adastx@users.noreply.github.com> | 2022-08-13 09:53:51 +0200 |
commit | b59cdeb9aec97eb1e98fe79ff2e32dd1b06b5273 (patch) | |
tree | 815153ccb401be12864c1cfa68503ef9f77fc2e3 /.config/vim/vimrc | |
parent | cc39b28540430dbc23f808fac96835a40d17363b (diff) |
vim: bootstrap vim-plug
Diffstat (limited to '.config/vim/vimrc')
-rw-r--r-- | .config/vim/vimrc | 11 |
1 files changed, 10 insertions, 1 deletions
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' |