ocp-indent-vim


Ⅰ. 插件描述

Integration of ocp-indent to vim.

Ⅱ. 基本信息

创建日期:  2013-04-15
使用用户:  58
Github星:  26
插件作者:  Frédéric Bour

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/def-lkb/ocp-indent-vim

Ⅳ. 文档说明

Use with ocp-indent >= 1.2.0.

Just add this directory to your runtime path.

set rtp+=</path/to/ocp-indent-vim>

BEWARE: By default, ocp-indent only works with spaces, not tabs. So be sure to :set expandtab either globally or for your ocaml files, for example by putting a line au FileType ocaml setlocal expandtab in your .vimrc

Released under MIT License.

Passing custom arguments to ocp-indent

You can set the variables g:ocp_indent_args (global settings) or b:ocp_indent_args (buffer local settings) to pass arguments to ocp-indent.

Set variable to a string or a list of strings.

This may work for enabling tab-based indenting if required -- see the ocp-indent documentation.

添加新评论