textobj-syntax


Ⅰ. 插件描述

Vim plugin: Text objects for syntax highlighted items

Ⅱ. 基本信息

创建日期:  2009-07-17
使用用户:  192
Github星:  24
插件作者:  Kana Natsuno

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

textobj-syntax is a Vim plugin to provide |text-objects| to select one or
more items which are syntax highlighted.

For example, if you edit the following line in your vimrc, characters which
are underlined with "~" are syntax highlighted.

nnoremap <silent> ql  :<C-u>clist<Return>
~~~~~~~~ ~~~~~~~~      ~~~~~     ~~~~~~~~

So |<Plug>(textobj-syntax-a)| and |<Plug>(textobj-syntax-i)| (which are mapped
from  |ay| and |iy| by default) select one of the underlined items if the
cursor is located at the one of them.

Requirements:

  • Vim 7.2 or later
  • |textobj-user| 0.3.8 or later (vimscript#2100)

Latest version:
http://github.com/kana/vim-textobj-syntax

Document in HTML format:
http://kana.github.com/config/vim/textobj-syntax.html

添加新评论