diff options
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' |