__
__ _\_\ ___ ____
\ \ / / |/ __\/ __ \
\ \ /| |\ \__\ __/
\_/ |_| \___/\____\
Vice is an extensible, lightweight, self-contained Vim addon framework. Unlike other configurations/distributions, vice makes no assumptions about how you'll want to configure Vim. Its opinions can be succinctly 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 has no dependencies β it is a single autoload file. Addons are plain git repositories; vice clones them on demand, adds them to the runtimepath and sources them. No plugin-index, no manager to bootstrap, no network calls at startup beyond cloning the addons you've actually requested.
- Filetype-specific addons (
vim-markdown,clang_complete, β¦) load lazily, the first time you open a matching file. - Command-specific addons (
:NERDTreeToggle,:Gist, β¦) load the first time the command is invoked. - Addons are cloned automatically on first launch and updated with one command.
- No external dependencies β vice manages everything itself.
- Vice modules bundle together frequently used addons.
Get up and running fast:
curl -fsSL https://raw.githubusercontent.com/zeekay/vice/master/scripts/install.sh | sh
-
Back up your
~/.vimand~/.vimrcif you have them.mv ~/.vim ~/.vim.bak -
Clone vice into
~/.vim/addons.mkdir -p ~/.vim/addons git clone https://github.com/zeekay/vice ~/.vim/addons/vice -
Add vice to the runtimepath and call
vice#Initializefrom your~/.vimrc:set nocompatible filetype indent plugin on | syntax on let &rtp.=','.expand('~/.vim/addons/vice') call vice#Initialize({ \ 'addons': [ \ 'github:zeekay/vice-standard-issue', \ 'github:zeekay/vice-colorful', \ 'github:zeekay/vice-git', \ 'github:tpope/vim-vinegar', \ ], \ })
Launch Vim β every addon is cloned into ~/.vim/addons on first run.
Addons are referenced as host:user/repo. Supported shorthands resolve to a
clone url; the local directory is always the repo name:
| Name | Clones from |
|---|---|
github:user/repo |
https://github.com/user/repo |
gitlab:user/repo |
https://gitlab.com/user/repo |
bitbucket:user/repo |
https://bitbucket.org/user/repo |
https://host/user/repo |
used verbatim |
git@host:user/repo |
used verbatim |
There are three sections to the g:vice configuration dictionary, all passed to
vice#Initialize (or set on g:vice beforehand).
Addons sourced on startup, activated in order:
let g:vice.addons = ['github:zeekay/vice-standard-issue']
Sourced the first time a matching filetype is opened. The key is a regexp
matched against &filetype:
let g:vice.ft_addons['c$\|cpp'] = ['github:Rip-Rip/clang_complete']
Infrequently-used addons can be bound to a command. A placeholder command is created and replaced by the real one when first invoked:
let g:vice.commands['Ack'] = ['github:mileszs/ack.vim']
:ViceUpdateβgit pullevery configured addon.:ViceListβ paste the list of addon directories into the current buffer.
Vice modules are addons whose repo name starts with vice-. They bundle and
configure related addons via vice#Extend. Available modules:
- vice-colorful β colorschemes and
:ColorNext/:ColorPrev. - vice-ctrlp β integrates ctrlp.vim.
- vice-delimitmate β integrates delimitMate.
- vice-git β integrates fugitive and Gitv.
- vice-markdown β Markdown support.
- vice-nerdtree β integrates NERDTree.
- vice-polyglot β broad language support.
- vice-standard-issue β sensible defaults and mappings.
- vice-tagbar β integrates tagbar.
- vice-undo β persistent undo and UndoTree.