dotfiles/config/automatrop/roles/vim/templates/plugins.j2
2021-07-02 22:57:07 +02:00

22 lines
663 B
Django/Jinja

" Auto-install vim-plug
if empty(glob('~/.cache/vim/autoload/plug.vim'))
silent !curl -fLo ~/.cache/vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
{% set plugins = namespace(sources=[]) %}
{% import 'pluginlist.j2' as pluginlist with context %}
call plug#begin('~/.cache/vim/plugged')
{% for link, extra in plugins.sources %}
{% if extra %}
Plug '{{ link }}', { {% for k, v in extra.items() %}'{{ k }}': '{{ v }}', {% endfor %} }
{% else %}
Plug '{{ link }}'
{% endif %}
{% endfor %}
call plug#end()
{% include 'pluginlist.j2' %}