vim-sluice


Ⅰ. 插件描述

uses +signs sidebar to show where other s/// matches are in your current window.

Ⅱ. 基本信息

创建日期:  2009-12-20
使用用户:  1
Github星:  2
插件作者:  Dane Summers

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

Sluice

The sluice plugin uses vim's '+signs' gutter to provide additional context
while editing in Vim. It provides two modes of operation:

  • __micro__: The signs gutter will show information relevant to the current
    line directly to the right.
  • __macro__: The gutter is condensed to act like a scroll bar, where the
    overall context of the files are 'shrunk' to fit within the current visible

signs.

This plugin is extensible (see sluice-plugins). Currently sluice is bundled
with three plugins: search (show all matches to the @/ register), undercursor
(show all matches in the file for the word currently under the cursor), git
(show all additions and subtractions in the file if the file is in a git
repository).

Screenshots

Micro mode

In 'micro mode' the icon gutter works in the way one normally expects: the
gutter immediately to the left of a line corresponds to the line next to it.

The screenshot below shows how sluice looks in plain old text mode:

text micro mode screenshot

When '+icon' support is setup and imagemagick is installed, the same screen
looks like:

icon micro mode screenshot

Macro mode

In 'macro mode' the icon gutter works more like a scrollbar. The region with
the same background color as the vim window correspond to what is currently
visible on the screen, while the darker background in the gutter correspond to
parts of the file not currently visible.

In the text version of the gutter plugin below we can see that we are in the
top part of the file, and that the word 'function' (the word that the
cursor is currently resting on) has matches further down in the file. The 'X'
characters denote areas where both a normal search (in this screenshot for
'slash') is also the same general region where the word under the cursor also
matches:

text macro mode screenshot

When graphics are enabled, the same information is rendered thusly:

icon macro mode screenshot

Requirements

Vim 7.3+, with '+signs' support, and the vus library.

For icon based gutter, vim must have '+icon' support and you need imagemagick

  1. On OSX:

    brew install imagemagick

Testing

To run the unit tests you must install the [vimunit

plugin](https://github.com/dsummersl/vimunit). They can be run by typing the
following on the console:

~/.vim/bundle/vimunit/vutest.sh autoload/sluice/test.vim

添加新评论