textobj-indblock


Ⅰ. 插件描述

Vim text objects for blocks of indentation whitespace

Ⅱ. 基本信息

创建日期:  2012-12-08
使用用户:  26
Github星:  16
插件作者:  glts

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

textobj-indblock

This Vim plugin provides text objects to act on a block of indentation
whitespace based on the indentation of the current line.

This plugin supplements and closely follows the example of the
textobj-indent plugin.

In general, that plugin is more useful but on some occasions it can be
preferable to act on indentation whitespace directly.

Usage

As usual, on-line documentation is available at :h textobj-indblock.

But as they say, a picture is worth a thousand words. Have a GIF:

demo

The GIF shows the effects of the two text objects 'inner/a block of
indentation whitespace' in Visual mode, vio and vao by default. ('o'
is right next to 'i' for 'indent'.)

Requirements

Installation

Move the files into their respective directories inside your ~/.vim
directory (or your $HOME\vimfiles directory if you're on Windows).

This plugin plays well with plugin managers. For example, with
pathogen.vim the installation is as simple as this:

git clone git://github.com/glts/vim-textobj-indblock.git ~/.vim/bundle/textobj-indblock

Don't forget to install textobj-user, too, if you haven't already.

添加新评论