💉 My favorite vice and a vim hacking gateway drug.
__
__ _\_\ ___ ____
\ \ / / |/ __\/ __ \
\ \ /| |\ \__\ __/
\_/ |_| \___/\____\
Vice is an extensible, flexible and modular cross-platform Vim framework.
Unlike other configurations/distributions, vice makes no assumptions about how
you’ll want to configure Vim. It’s opinions can be succintly summarized:
set nocompatible
filetype indent plugin on | syntax on
Vice is designed to be as efficient and lightweight as possible, lazily enabling
filetype-specific and command-specific addons as needed. Addons are specified
declaratively, making customization simple. Vice supports pathogen, vundle and
vim-addon-manager compatible addons.
Several modules are also available which bundle together commonly used addons
which extend the functionality of Vim and provide a more luxurious editing
enviroment.
vim-coffeescript
, vim-markdown
, etc’):Ack
, :NerdTreeToggle
, etc) canGet up and running fast with the most commonly used addons:
curl https://raw.github.com/zeekay/vice/master/scripts/install.sh | sh
For the truly meticulous, manual installation is the the way to go.
Backup your ~/.vim
dir, if you have one!
mv ~/.vim ~/.vim.bak
Create ~/.vim/addons
dir (and ~/.vim/tmp/backup
if you want to use vice-standard-issue
).
mkdir -p ~/.vim/addons
mkdir -p ~/.vim/tmp/backup
Clone vim-addon-manager and vice into ~/.vim/addons
.
cd ~/.vim/addons
git clone https://github.com/MarcWeber/vim-addon-manager
git clone https://github.com/zeekay/vice
Add vice to Vim’s runtime path and call vice#Initialize
.
set nocompatible
filetype indent plugin on | syntax on
let &rtp.=','.expand('~/.vim/addons/vice')
call vice#Initialize({
\ 'addons': [
\ 'github:zeekay/vice-beautify',
\ 'github:zeekay/vice-colorful',
\ 'github:zeekay/vice-ctrlp',
\ 'github:zeekay/vice-delimitmate',
\ 'github:zeekay/vice-git',
\ 'github:zeekay/vice-neocompletion',
\ 'github:zeekay/vice-nerdtree',
\ 'github:zeekay/vice-polyglot',
\ 'github:zeekay/vice-standard-issue',
\ 'github:zeekay/vice-syntastic',
\ 'github:zeekay/vice-powerline',
\ 'github:zeekay/vice-undo',
\ ],
\ })
There are three important sections to the g:vice
global configuration
dictionary:
Addons which you expect to be sourced automatically should be defined ing:vice.addons
, which is an array of addons that will be activated in order.
Each addon specified should follow vim-addon-manager‘s expected syntax,
which is host:user/repo
. For addons hosted on github, you can use the
shortened syntax:
let g:vice.addons = ['github:zeekay/vice-standard-issue']
Filetype specific addons are sourced when files matching their filetype pattern matches:
let g:vice.ft_addons['c$\|cpp'] = ['github:Rip-Rip/clang_complete']
An array of addons can be specified for each filetype pattern.
Commands which are called infrequently and do not require the addon providing
them to be sourced on every start can be specified in the command
key:
let g:vice.commands['Ack'] = ['github:mileszs/ack.vim']
A placeholder command will be created which will be replaced by the real command
when the addon is sourced.
There are several vice modules (essentially vim addons) which are designed to
work with Vice and make it easy to get up and running fast:
:Beautify
command:ColorNext
, :ColorPrev
, etc and bundles ColorV.