vim-textobj-enclosedsyntax


Ⅰ. 插件描述

Ⅱ. 基本信息

创建日期:  2012-06-19
使用用户:  15
Github星:  8
插件作者:  deris

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

textobj-enclosedsyntax

This is Vim plugin for treat enclosed syntax as text objext.

Now support following enclosed syntax as text object

  • Perl regex like /.../ (support like m|...| m#...#)
  • Perl litarel like q|...|, qq|...|, qw|...|, qx|...|, qr|...| (support like q#...# q!...! in the same way)
  • Perl here document
  • Ruby regex like /.../
  • Ruby literal like %|...|, %q|...|, %Q|...|, %x|...|, %r|...|, %w|...|, %w|...|, %W|...|, %s|...| (support like %#...# %!...! in the same way)
  • Ruby here document
  • eRuby tag like <%=...%>, <%...%>, <%#...%>

Screenshot

Perl

Perl screenshot

Ruby

Ruby screenshot

eRuby

eRuby screenshot

Install

This plugin depends on vim-textobj-user.

So you need to install vim-textobj-user together.

And you must syntax on to use this plugin.

Usage

Default key mappings is iq and aq (operator mode).

iq can use inner enclosed syntax as text object.

aq can use a enclosed syntax as text object.

For example diq to use delete inner enclosed syntax.

添加新评论