项目作者: zeekay

项目描述 :
💉 My favorite vice and a vim hacking gateway drug.
高级语言: VimL
项目地址: git://github.com/zeekay/vice.git
创建时间: 2011-11-10T05:44:57Z
项目社区:https://github.com/zeekay/vice

开源协议:MIT License

下载


  1. __
  2. __ _\_\ ___ ____
  3. \ \ / / |/ __\/ __ \
  4. \ \ /| |\ \__\ __/
  5. \_/ |_| \___/\____\

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:

  1. set nocompatible
  2. 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.

Features

  • Addons which are filtype specific (vim-coffeescript, vim-markdown, etc’)
    can be lazily loaded as needed.
  • Addons which provide specific commands (:Ack, :NerdTreeToggle, etc) can
    delay loading until desired command is called.
  • Addons are installed and can be updated automatically.
  • Extremely lightweight.
  • Vice modules are available which bundle together frequently used addons.

Installation

One liner for the impatient

Get up and running fast with the most commonly used addons:

  1. curl https://raw.github.com/zeekay/vice/master/scripts/install.sh | sh

Manual installation

For the truly meticulous, manual installation is the the way to go.

  1. Backup your ~/.vim dir, if you have one!

    1. mv ~/.vim ~/.vim.bak
  2. Create ~/.vim/addons dir (and ~/.vim/tmp/backup if you want to use vice-standard-issue).

    1. mkdir -p ~/.vim/addons
    2. mkdir -p ~/.vim/tmp/backup
  3. Clone vim-addon-manager and vice into ~/.vim/addons.

    1. cd ~/.vim/addons
    2. git clone https://github.com/MarcWeber/vim-addon-manager
    3. git clone https://github.com/zeekay/vice
  4. Add vice to Vim’s runtime path and call vice#Initialize.

    1. set nocompatible
    2. filetype indent plugin on | syntax on
    3. let &rtp.=','.expand('~/.vim/addons/vice')
    4. call vice#Initialize({
    5. \ 'addons': [
    6. \ 'github:zeekay/vice-beautify',
    7. \ 'github:zeekay/vice-colorful',
    8. \ 'github:zeekay/vice-ctrlp',
    9. \ 'github:zeekay/vice-delimitmate',
    10. \ 'github:zeekay/vice-git',
    11. \ 'github:zeekay/vice-neocompletion',
    12. \ 'github:zeekay/vice-nerdtree',
    13. \ 'github:zeekay/vice-polyglot',
    14. \ 'github:zeekay/vice-standard-issue',
    15. \ 'github:zeekay/vice-syntastic',
    16. \ 'github:zeekay/vice-powerline',
    17. \ 'github:zeekay/vice-undo',
    18. \ ],
    19. \ })

Configuration

There are three important sections to the g:vice global configuration
dictionary:

Always enabled addons

Addons which you expect to be sourced automatically should be defined in
g: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:

  1. let g:vice.addons = ['github:zeekay/vice-standard-issue']

Filetype specific addons

Filetype specific addons are sourced when files matching their filetype pattern matches:

  1. let g:vice.ft_addons['c$\|cpp'] = ['github:Rip-Rip/clang_complete']

An array of addons can be specified for each filetype pattern.

Commands

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:

  1. 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.

Modules

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: