diff options
author | gxlin <[email protected]> | 2021-07-15 21:28:06 +0800 |
---|---|---|
committer | gxlin <[email protected]> | 2021-07-15 21:28:06 +0800 |
commit | d4e1469e4b0c5aaf5c23be555e8b224f9254d781 (patch) | |
tree | e68a0e5dd44ee43efc2d70c081f41ae3237a78c1 /.vim/plugin/init.vim | |
parent | 36f249e1a7250e24f0c415b5bc53ba1b2f5806d4 (diff) | |
download | dotfiles-d4e1469e4b0c5aaf5c23be555e8b224f9254d781.tar.gz dotfiles-d4e1469e4b0c5aaf5c23be555e8b224f9254d781.tar.bz2 dotfiles-d4e1469e4b0c5aaf5c23be555e8b224f9254d781.zip |
A usable boostrap config
Diffstat (limited to '.vim/plugin/init.vim')
-rw-r--r-- | .vim/plugin/init.vim | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/.vim/plugin/init.vim b/.vim/plugin/init.vim new file mode 100644 index 0000000..7f71d9c --- /dev/null +++ b/.vim/plugin/init.vim @@ -0,0 +1,28 @@ +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('~/.vim/plugin/*.plug')) +let s:settings = split(expand('~/.vim/plugin/*.vim')) + +function! s:load_plugins() + for plugin in s:plugins + exec "source " . plugin + endfor +endfunction + +function! s:load_settings() + for setting in s:settings + if setting !~ 'init.vim' + exec "source " . setting + endif + endfor +endfunction + +call plug#begin('~/.vim/plugged') +call s:load_plugins() +call plug#end() + +call s:load_settings() |