vim-hideshow


Ⅰ. 插件描述

Interactive, regex-based folding

Ⅱ. 基本信息

创建日期:  2014-07-22
使用用户:  1
Github星:  14
插件作者:  ctechols

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# HideShow.vim

HideShow makes it easy to apply regex based folding to your vim buffer.
For example, a trivial folding of a Java source file might be:

:Show \v(public|private|protected)

:Show and :Hide invocations are cumulative, so the following three
invocations of :Show are equivalent to the single command above:

:Show public
:Show protected
:Show private

:Show and :Hide invocations work together. So to naively show all
class field declarations:

:Show \v^\s*(public|private|protected).*;$

Now, all 'String' fields can be folded away with:

:Hide String

Once folds are no longer needed:

:ShowAll

HideShow uses a fold expression to create its folds, so any new text
will be folded according to the commands already issued.

HideShow is meant to be a simple, quick-and-dirty way to create, refine,
and clear folding when pre-defined fold methods for a filetype are
non-existent or suboptimal. The folds aren't the pretty, nested,
syntax-aware folds that are created in something like eclipse, but they
are simple and effective.

Installation

Just clone the repo into your pathogen bundle directory.

添加新评论