wildfire.vim


Ⅰ. 插件描述

Smart selection of the closest text object

Ⅱ. 基本信息

创建日期:  2014-01-08
使用用户:  6
Github星:  3
插件作者:  Shougo

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

## wildfire.vim

With Wildfire you can quickly select the closest text object among a group of

  1. By default candidates are i', i", i), i], i}, ip and it.

Learn more about text objects with :help text-objects.

Preview

Usage

Press <ENTER> in normal mode to select the closest text object. Keep pressing
<ENTER> for selecting the next closest text object. To go the other way
round, that is, to select the previously selected text object, press <BS>.

To speed things up, if you want to select the nth closest text object you can
press a number followed by <ENTER> (e.g. pressing 2<ENTER> will select the
second closest text
object).

To change default mappings use the following options:

" This selects the next closest text object.
let g:wildfire_fuel_map = "<ENTER>"

" This selects the previous closest text object.
let g:wildfire_water_map = "<BS>"

By default, Wildfire selects any of the text objects i', i", i), i],
i}, ip and it. You can decide the ones to consider with the following
option:

let g:wildfire_objects = ["i'", 'i"', "i)", "i]", "i}", "ip", "it"]

Advanced setup

Sometimes considering certain kinds of text objects can be quite annoying. This
is the case of Html, where, for example, you may want to select just tag objects.

Wildfire allows you to be selective about which text objects are considered with
different filetypes:

" use '*' to mean 'all other filetypes'
" in this example, html and xml share the same text objects
let g:wildfire_objects = {
    \ "*" : ["i'", 'i"', "i)", "i]", "i}", "ip"],
    \ "html,xml" : ["at"],
\ }

添加新评论