Split into thematic parts.

This commit is contained in:
Glenn Y. Rolland 2015-10-22 23:07:53 +02:00
parent c8fc116b20
commit a22235b000
5 changed files with 172 additions and 138 deletions

View file

@ -1,2 +1,7 @@
---
# defaults file for glenux.vim
vimrc_boundary: Ansible glenux.vim
vimrc_boundary_begin: "\\\" BEGIN {{vimrc_boundary}} -- DO NOT MODIFY"
vimrc_boundary_end: "\\\" END {{vimrc_boundary}}"
vimrc_boundary_begin_regexp: "^{{vimrc_boundary_begin}}"
vimrc_boundary_end_regexp: "^{{vimrc_boundary_end}}"

View file

@ -1,142 +1,7 @@
---
# tasks file for glenux.vim
# Inspiration from https://github.com/ChengLong/ansible-vim/blob/master/tasks/main.yml
- name: Make directories for Pathogen
command: mkdir -p ~/.vim/autoload ~/.vim/bundle
become: true
become_user: "{{vim_user}}"
- name: Install Pathogen
command: >
curl -LSso ~/.vim/autoload/pathogen.vim https://raw.github.com/tpope/vim-pathogen/master/autoload/pathogen.vim
become: true
become_user: "{{vim_user}}"
- name: Install Solarized
git: >
repo=git://github.com/altercation/vim-colors-solarized.git
dest=~/.vim/bundle/vim-colors-solarized
update=yes
accept_hostkey=yes
become: true
become_user: "{{vim_user}}"
- name: Install Nerdtree
git:
repo=https://github.com/scrooloose/nerdtree.git
dest=~/.vim/bundle/nerdtree
update=yes
accept_hostkey=yes
become: true
become_user: "{{vim_user}}"
- name: Install AutoComplPop
git:
repo=https://github.com/vim-scripts/AutoComplPop.git
dest=~/.vim/bundle/AutoComplPop
update=yes
accept_hostkey=yes
become: true
become_user: "{{vim_user}}"
- name: Install vim-fugitive
git:
repo=https://github.com/tpope/vim-fugitive.git
dest=~/.vim/bundle/vim-fugitive
update=yes
accept_hostkey=yes
become: true
become_user: "{{vim_user}}"
#- name: Install CtrlP
# git:
# repo=https://github.com/kien/ctrlp.vim.git
# dest=~/.vim/bundle/ctrlp.vim
# update=yes
# accept_hostkey=yes
# become: true
# become_user: "{{vim_user}}"
- name: Install rainbow_parentheses
git:
repo=https://github.com/kien/rainbow_parentheses.vim.git
dest=~/.vim/bundle/rainbow_parentheses
update=yes
accept_hostkey=yes
become: true
become_user: "{{vim_user}}"
- name: Install syntastic/
git:
repo=https://github.com/scrooloose/syntastic.git
dest=~/.vim/bundle/syntastic
update=yes
accept_hostkey=yes
become: true
become_user: "{{vim_user}}"
- name: Install tabular
git:
repo=https://github.com/godlygeek/tabular.git
dest=~/.vim/bundle/tabular
update=yes
accept_hostkey=yes
become: true
become_user: "{{vim_user}}"
- name: Install vim-bundler
git:
repo=https://github.com/tpope/vim-bundler.git
dest=~/.vim/bundle/vim-bundler
update=yes
accept_hostkey=yes
become: true
become_user: "{{vim_user}}"
- name: Install vim-javascript
git:
repo=https://github.com/pangloss/vim-javascript.git
dest=~/.vim/bundle/vim-javascript
update=yes
accept_hostkey=yes
become: true
become_user: "{{vim_user}}"
- name: Install vim-puppet
git:
repo=https://github.com/rodjek/vim-puppet.git
dest=~/.vim/bundle/vim-puppet
update=yes
accept_hostkey=yes
become: true
become_user: "{{vim_user}}"
- name: Install vim-rails
git:
repo=https://github.com/tpope/vim-rails.git
dest=~/.vim/bundle/vim-rails
update=yes
accept_hostkey=yes
become: true
become_user: "{{vim_user}}"
- name: Install vim-sensible
git:
repo=https://github.com/tpope/vim-sensible.git
dest=~/.vim/bundle/vim-sensible
update=yes
accept_hostkey=yes
become: true
become_user: "{{vim_user}}"
- name: Install YouCompleteMe
git:
repo=https://github.com/Valloric/YouCompleteMe.git
dest=~/.vim/bundle/YouCompleteMe
update=yes
accept_hostkey=yes
become: true
become_user: "{{vim_user}}"
- include: vimrc.yml
- include: pathogen.yml
- include: pathogen-plugins.yml

129
tasks/pathogen-plugins.yml Normal file
View file

@ -0,0 +1,129 @@
---
- name: Install Solarized
git: >
repo=git://github.com/altercation/vim-colors-solarized.git
dest=~/.vim/bundle/vim-colors-solarized
update=yes
accept_hostkey=yes
become: true
become_user: "{{vim_user}}"
- name: Install Nerdtree
git:
repo=https://github.com/scrooloose/nerdtree.git
dest=~/.vim/bundle/nerdtree
update=yes
accept_hostkey=yes
become: true
become_user: "{{vim_user}}"
- name: Install AutoComplPop
git:
repo=https://github.com/vim-scripts/AutoComplPop.git
dest=~/.vim/bundle/AutoComplPop
update=yes
accept_hostkey=yes
become: true
become_user: "{{vim_user}}"
- name: Install vim-fugitive
git:
repo=https://github.com/tpope/vim-fugitive.git
dest=~/.vim/bundle/vim-fugitive
update=yes
accept_hostkey=yes
become: true
become_user: "{{vim_user}}"
#- name: Install CtrlP
# git:
# repo=https://github.com/kien/ctrlp.vim.git
# dest=~/.vim/bundle/ctrlp.vim
# update=yes
# accept_hostkey=yes
# become: true
# become_user: "{{vim_user}}"
- name: Install rainbow_parentheses
git:
repo=https://github.com/kien/rainbow_parentheses.vim.git
dest=~/.vim/bundle/rainbow_parentheses
update=yes
accept_hostkey=yes
become: true
become_user: "{{vim_user}}"
- name: Install syntastic/
git:
repo=https://github.com/scrooloose/syntastic.git
dest=~/.vim/bundle/syntastic
update=yes
accept_hostkey=yes
become: true
become_user: "{{vim_user}}"
- name: Install tabular
git:
repo=https://github.com/godlygeek/tabular.git
dest=~/.vim/bundle/tabular
update=yes
accept_hostkey=yes
become: true
become_user: "{{vim_user}}"
- name: Install vim-bundler
git:
repo=https://github.com/tpope/vim-bundler.git
dest=~/.vim/bundle/vim-bundler
update=yes
accept_hostkey=yes
become: true
become_user: "{{vim_user}}"
- name: Install vim-javascript
git:
repo=https://github.com/pangloss/vim-javascript.git
dest=~/.vim/bundle/vim-javascript
update=yes
accept_hostkey=yes
become: true
become_user: "{{vim_user}}"
- name: Install vim-puppet
git:
repo=https://github.com/rodjek/vim-puppet.git
dest=~/.vim/bundle/vim-puppet
update=yes
accept_hostkey=yes
become: true
become_user: "{{vim_user}}"
- name: Install vim-rails
git:
repo=https://github.com/tpope/vim-rails.git
dest=~/.vim/bundle/vim-rails
update=yes
accept_hostkey=yes
become: true
become_user: "{{vim_user}}"
- name: Install vim-sensible
git:
repo=https://github.com/tpope/vim-sensible.git
dest=~/.vim/bundle/vim-sensible
update=yes
accept_hostkey=yes
become: true
become_user: "{{vim_user}}"
# - name: Install YouCompleteMe
# git:
# repo=https://github.com/Valloric/YouCompleteMe.git
# dest=~/.vim/bundle/YouCompleteMe
# update=yes
# accept_hostkey=yes
# become: true
# become_user: "{{vim_user}}"

19
tasks/pathogen.yml Normal file
View file

@ -0,0 +1,19 @@
---
- name: Make directories for Pathogen
command: mkdir -p ~/.vim/autoload ~/.vim/bundle
become: true
become_user: "{{vim_user}}"
- name: Install Pathogen
command: >
curl -LSso ~/.vim/autoload/pathogen.vim https://raw.github.com/tpope/vim-pathogen/master/autoload/pathogen.vim
become: true
become_user: "{{vim_user}}"
- lineinfile: >
dest=~/.vimrc
regexp=^execute.pathogen.infect
line="execute pathogen#infect()"
insertbefore="{{vimrc_boundary_end_regexp}}"
become: true
become_user: "{{vim_user}}"

16
tasks/vimrc.yml Normal file
View file

@ -0,0 +1,16 @@
- lineinfile: >
dest=~/.vimrc
regexp="{{vimrc_boundary_begin_regexp}}"
line="{{vimrc_boundary_begin}}"
create=yes
become: true
become_user: "{{vim_user}}"
- lineinfile: >
dest=~/.vimrc
regexp="{{vimrc_boundary_end_regexp}}"
insertafter="{{vimrc_boundary_begin_regexp}}"
line="{{vimrc_boundary_end}}"
become: true
become_user: "{{vim_user}}"