vim-ninja-feet


Ⅰ. 插件描述

Strike from the cursor to either end of a text object

Ⅱ. 基本信息

创建日期:  2014-04-07
使用用户:  11
Github星:  47
插件作者:  Tom McDonald

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

ninja-feet.vim

In Practical Vim by Drew Neil, a cute illustration outlines the
difference between Vim's standard motions and text objects. In short, we see a
ninja kicking in one direction (a motion) compared to a ninja kicking in two
directions (a text object).

Ninja with feet

While Vim has a great number of wonderful text objects, and plugins can add
even more, there is no general way to operate from the cursor to the beginning
or end of those text objects.

Well, now there is. ninja-feet.vim lets you do so by putting [ or ] between
the operator and the text object. For example, d]i) deletes from the cursor
to the end of the current parenthetical term. c[ip changes from the cursor to
the beginning of the paragraph.

You can also jump into Insert mode at the beginning or end of a text object
(technically, any motion) with z[ and z].

添加新评论