Fixed vimrc

Don't reinstall plugins every time vim starts
This commit is contained in:
Christian Baer 2021-01-23 21:38:56 +01:00
parent 1dc575539c
commit cd5949eb5e

View File

@ -6,13 +6,17 @@ set viminfo+='1000,n${VIMDOTDIR}/viminfo
set runtimepath=$XDG_CONFIG_HOME/vim,$VIMRUNTIME,$XDG_CONFIG_HOME/vim/after
" Install vim-plug
" Install vim-plug if not found
if empty(glob('${VIMDOTDIR}/autoload/plug.vim'))
silent !curl -fLo ${VIMDOTDIR}/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $VIMRC
endif
" Run PlugInstall if there are missing plugins
autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
\| PlugInstall --sync | source $VIMRC
\| endif
" Specify a directory for plugins
" Install plugins
call plug#begin('$VIMDOTDIR/plugged')