vim-hariti


Ⅰ. 插件描述

Vim plug-in manager for minimalist

Ⅱ. 基本信息

创建日期:  2014-11-17
使用用户:  1
Github星:  2
插件作者:  kamichidu

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'kamichidu/vim-hariti'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'kamichidu/vim-hariti'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'kamichidu/vim-hariti'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/kamichidu/vim-hariti

Ⅳ. 文档说明

hariti Build Status

This is a minimal plug-in manager for vim.
hariti is inspired by neobundle.vim, and this has lesser features.

hariti has some concepts:

  1. Start-up time is most important
  2. Minimal feature
  3. Clean &runtimepath

hariti is just an alpha version.

Installation

  1. Make a directory and clone this

    $ mkdir -p ~/.hariti/bundle/
    $ cd ~/.hariti/bundle/
    $ git clone https://github.com/kamichidu/vim-hariti
  2. Edit your bundles file

    bundles file is placed at ~/.hariti/bundles or g:hariti_config.source_filename.
    See example.

  3. Edit your $MYVIMRC

    if has('vim_starting')
        " For hariti work
        set runtimepath+=$HOME/.hariti/bundle/vim-hariti/
        runtime plugin/hariti.vim
    endif
    
    " Apply plug-ins to your &runtimepath
    HaritiSetup

Usage

  • HaritiSetup, HaritiApply

    It applies your plug-ins to your &runtimepath.
    HaritiSetup is equivalent to:

    filetype off
    HaritiApply
    filetype plugin indent on
  • HaritiBuild

    It builds your &runtimepath without applying.
    You can execute this command when you edit bundles file.

  • HaritiDocs

    It generates helptags for all bundles.

  • HaritiUpdate

    It updates bundles except local-bundles.

  • hariti#tap({name})

    It returns 1 if a plug-in it has a {name} is installed.
    Otherwise, 0.

  • g:hariti_bundles

    This variable is intended to use for alternative of hariti#tap().
    Vim script is tooo slow to call function, but variable access is fast.
    You can write alternate hariti#tap() likes below:

    if get(g:hariti_bundles, 'name', 0)
        ... some configuration ...
    endif

Bundles file grammar

Complete grammar description here.

  • Simple usage

    `use {github username}/{github repository}` or `use {plug-in name}`.
    
  • Make plug-in's alias

    `as {alias}`
    
    {alias} can be used for `hariti#tap()` and in depends section.
    
  • Conditional enabling/disabling plug-in

    `enable_if "{vim expr}"` or `enable_if '{vim expr}'`
    
    {vim expr} is simply placed in if condition.
    
  • Use other plug-ins are required by

    `depends ({dependant plug-in})`
    
  • Some shell or dosbatch scripts will run

    See vimproc [example](#example).
    

Example

bundles file:

use kamichidu/vim-hariti
    as hariti

use kamichidu/vim-unite-javaimport
    as unite-javaimport
    depends (
        Shougo/unite.vim
        kamichidu/vim-javaclasspath
    )

use Shougo/vimproc.vim
    as vimproc
    build {
        on windows
            - mingw32-make -f make_mingw64.mak
        on mac
            - make -f make_mac.mak
        on unix
            - make
        on *
            - echo 'success'
    }

use Shougo/neocomplete.vim
    as neco, neocomplete
    enable_if "has('lua')"

use Shougo/neocomplcache.vim
    as neco, neocomplcache
    enable_if "!has('lua')"

use eagletmt/neco-ghc
    depends (
        neco
    )

use local ~/sources/vim-plugin/
    # includes (
    # )
    excludes (
        _*
    )

添加新评论