plugins: Change easychair2 url
[vimconf.git] / plugsetup.vim
1 "Automatic installation of vim-plug.
2 "https://github.com/junegunn/vim-plug/wiki/tips
3 if empty(glob('~/.vim/autoload/plug.vim'))
4 silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
5 \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
6 autocmd VimEnter * PlugInstall --sync | source ~/.vim/init.vim
7 endif
8
9
10 call plug#begin('~/.vim/plugged')
11
12 source ~/.vim/plugins.vim
13
14 " Load various conditinoal plugin sets
15 if filereadable($HOME . '/.vim/plugins-local.vim')
16 source ~/.vim/plugins-local.vim
17 endif
18
19 if $USER != "root"
20 source ~/.vim/plugins-noroot.vim
21
22 if g:lowendbox == 0
23 source ~/.vim/plugins-noroot-nolowendbox.vim
24 endif
25 endif
26
27 call plug#end()
28
29
30 " Call the config functions of the plugins
31 call PluginsConfig()
32 if filereadable($HOME . '/.vim/plugins-local.vim')
33 call PluginsLocalConfig()
34 endif
35 if $USER != "root"
36 call PluginsNorootConfig()
37 if g:lowendbox == 0
38 call PluginsNorootNolowendboxConfig()
39 endif
40 endif
41
42
43 function s:PostConfig()
44 "Automatically install missing plugins
45 "https://github.com/junegunn/vim-plug/wiki/extra
46 if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
47 PlugInstall --sync | q
48 endif
49 endfunction
50
51 autocmd VimEnter * call s:PostConfig()