diff options
Diffstat (limited to '.vim/plugins/init.vim')
-rw-r--r-- | .vim/plugins/init.vim | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/.vim/plugins/init.vim b/.vim/plugins/init.vim new file mode 100644 index 0000000..590f18c --- /dev/null +++ b/.vim/plugins/init.vim @@ -0,0 +1,19 @@ +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 + autocmd VimEnter * PlugInstall --sync | source $MYVIMRC +endif + +let s:plugins = split(expand('~/.dotfiles/.vim/plugins/*.vim')) + +function! s:load_plugins() + for plugin in s:plugins + if plugin !~ 'init.vim' + exec "source " . plugin + endif + endfor +endfunction + +call plug#begin('~/.vim/plugged') +call s:load_plugins() +call plug#end() |