Skip to content

Commit

Permalink
Switched from Pathogen to Vundle for Vim plugins
Browse files Browse the repository at this point in the history
* Replaces Vim plugins in Ansible with Vundle plugin installation
* Added curl to Ansible package installations
* Slightly reorganized packages in Ansible
* Updated `.vimrc` with Vundle plugin installation configuration
* Updated `.vimrc` with conditional loading of the colorscheme
* Added Vundle Vim plugin installation to `base.yml`
  • Loading branch information
mamchenkov committed Sep 9, 2018
1 parent 2b7d568 commit 0c54daa
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 38 deletions.
3 changes: 3 additions & 0 deletions base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@
vars:
git_repos: "{{ vim_plugins }}"

- name: Install Vim plugins
shell: vim +PluginInstall +qall

72 changes: 64 additions & 8 deletions files/home/base/.vimrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,63 @@
"
" Plugins
"

" Load all bundles via Pathogen vim plugin
call pathogen#infect()
call pathogen#helptags()
" This is my Vim.
" There are many like this,
" But this one is mine.
" Without me, my Vim is useless.
" Without Vim, I am useless.

" Vundle plugin manager requirements
set nocompatible
filetype off
" git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
set rtp+=~/.vim/bundle/Vundle.vim
" Run :PluginInstall to install everything
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'

" Libraries and utils used by other plugins
Plugin 'tomtom/tlib_vim'
Plugin 'mattn/webapi-vim'
Plugin 'MarcWeber/vim-addon-mw-utils'
Plugin 'xolox/vim-misc'

" Beautifiers
Plugin 'flazz/vim-colorschemes'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'vim-scripts/CSApprox'

" General utilities
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'ervandew/supertab'
Plugin 'mileszs/ack.vim'

" General programming
Plugin 'scrooloose/nerdcommenter'
Plugin 'scrooloose/nerdtree'
Plugin 'editorconfig/editorconfig-vim'
Plugin 'majutsushi/tagbar'
Plugin 'scrooloose/syntastic'
Plugin 'sheerun/vim-polyglot'
Plugin 'tmhedberg/matchit'
Plugin 'KabbAmine/zeavim.vim'

" Git
Plugin 'airblade/vim-gitgutter'
Plugin 'tpope/vim-fugitive'
Plugin 'mattn/gist-vim' " requieres: mattn/webapi-vim
Plugin 'Xuyuanp/nerdtree-git-plugin' " requires: scrooloose/nerdtree

" HTML/XML
Plugin 'docunext/closetag.vim'

" JavaScript
Plugin 'vim-scripts/jQuery'

" PHP
Plugin 'vim-php/tagbar-phpctags.vim'

call vundle#end()
" To ignore plugin indent changes use 'filetype plugin on' instead
filetype plugin indent on

" Change mapleader to ,
let mapleader = ","
Expand All @@ -18,7 +71,10 @@ syntax on " switch on syntax highlighting
syntax enable
set t_Co=256 " Must be BEFORE the colorscheme
let g:lucius_no_term_bg=1 " Transparent background
colorscheme lucius
" Use colorscheme if installed
if filereadable(expand("~/.vim/bundle/vim-colorschemes/colors/lucius.vim"))
colorscheme lucius
endif
" hi Normal ctermfg=253 ctermbg=none cterm=none " Set transparent background

" Airline
Expand Down
39 changes: 9 additions & 30 deletions inventory/host_vars/localhost.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,20 @@ base_packages:
- { name: "bind-utils", state: "{{ package_state_default }}" }
- { name: "grep", state: "{{ package_state_default }}" }
- { name: "htop", state: "{{ package_state_default }}" }
- { name: "httpie", state: "{{ package_state_default }}" }
- { name: "links", state: "{{ package_state_default }}" }
- { name: "mc", state: "{{ package_state_default }}" }
- { name: "mtr", state: "{{ package_state_default }}" }
- { name: "mutt", state: "{{ package_state_default }}" }
- { name: "screen", state: "{{ package_state_default }}" }
- { name: "sysstat", state: "{{ package_state_default }}" }
# Networking
- { name: "mtr", state: "{{ package_state_default }}" }
- { name: "tcpdump", state: "{{ package_state_default }}" }
- { name: "telnet", state: "{{ package_state_default }}" }
# Terminal emulation
- { name: "screen", state: "{{ package_state_default }}" }
- { name: "tmux", state: "{{ package_state_default }}" }
# HTTP
- { name: "curl", state: "{{ package_state_default }}" }
- { name: "httpie", state: "{{ package_state_default }}" }
- { name: "links", state: "{{ package_state_default }}" }
- { name: "wget", state: "{{ package_state_default }}" }
# Git
- { name: "git", state: "{{ package_state_default }}" }
Expand All @@ -41,32 +45,7 @@ vim_plugin_base: "~/.vim/bundle"
# For parameters see:
# - http://docs.ansible.com/ansible/git_module.html
vim_plugins:
- { repo: "https://github.com/airblade/vim-gitgutter.git", dest: "{{ vim_plugin_base }}/gitgutter" }
- { repo: "https://github.com/ctrlpvim/ctrlp.vim", dest: "{{ vim_plugin_base }}/ctrlp" }
- { repo: "https://github.com/docunext/closetag.vim.git", dest: "{{ vim_plugin_base }}/closetag" }
- { repo: "https://github.com/editorconfig/editorconfig-vim.git", dest: "{{ vim_plugin_base }}/editorconfig" }
- { repo: "https://github.com/ervandew/supertab.git", dest: "{{ vim_plugin_base }}/supertab" }
- { repo: "https://github.com/flazz/vim-colorschemes.git", dest: "{{ vim_plugin_base }}/colorschemes" }
- { repo: "https://github.com/majutsushi/tagbar.git", dest: "{{ vim_plugin_base }}/tagbar" }
- { repo: "https://github.com/MarcWeber/vim-addon-mw-utils.git", dest: "{{ vim_plugin_base }}/mv-utils" }
- { repo: "https://github.com/mattn/gist-vim.git", dest: "{{ vim_plugin_base }}/gist" }
- { repo: "https://github.com/mattn/webapi-vim.git", dest: "{{ vim_plugin_base }}/webapi" }
- { repo: "https://github.com/mileszs/ack.vim.git", dest: "{{ vim_plugin_base }}/ack" }
- { repo: "https://github.com/scrooloose/nerdcommenter.git", dest: "{{ vim_plugin_base }}/nerdcommenter" }
- { repo: "https://github.com/scrooloose/nerdtree.git", dest: "{{ vim_plugin_base }}/nerdtree" }
- { repo: "https://github.com/scrooloose/syntastic.git", dest: "{{ vim_plugin_base }}/syntastic" }
- { repo: "https://github.com/sheerun/vim-polyglot.git", dest: "{{ vim_plugin_base }}/polyglot" }
- { repo: "https://github.com/tmhedberg/matchit.git", dest: "{{ vim_plugin_base }}/matchit" }
- { repo: "https://github.com/tomtom/tlib_vim.git", dest: "{{ vim_plugin_base }}/tlib" }
- { repo: "https://github.com/tpope/vim-fugitive.git", dest: "{{ vim_plugin_base }}/fugitive" }
- { repo: "https://github.com/vim-airline/vim-airline.git", dest: "{{ vim_plugin_base }}/airline" }
- { repo: "https://github.com/vim-airline/vim-airline-themes.git", dest: "{{ vim_plugin_base }}/airline-themes" }
- { repo: "https://github.com/vim-php/tagbar-phpctags.vim.git", dest: "{{ vim_plugin_base }}/tagbar-phpctags" }
- { repo: "https://github.com/vim-scripts/CSApprox.git", dest: "{{ vim_plugin_base }}/CSApprox" }
- { repo: "https://github.com/vim-scripts/jQuery.git", dest: "{{ vim_plugin_base }}/jquery" }
- { repo: "https://github.com/xolox/vim-misc.git", dest: "{{ vim_plugin_base }}/misc" }
- { repo: "https://github.com/Xuyuanp/nerdtree-git-plugin.git", dest: "{{ vim_plugin_base }}/nerdtree-git" }
- { repo: "https://github.com/KabbAmine/zeavim.vim.git", dest: "{{ vim_plugin_base }}/zealvim" }
- { repo: "https://github.com/VundleVim/Vundle.vim.git", dest: "{{ vim_plugin_base }}/Vundle.vim" }

# GUI related packages to be installed on desktops
# For parameters see:
Expand Down

0 comments on commit 0c54daa

Please sign in to comment.