aboutsummaryrefslogtreecommitdiff
path: root/.vim/plugin/init.vim
blob: 7f71d9c60f58c0c60bacdb4666f4a1499a4b099e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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()