vim-textobj-erb


Ⅰ. 插件描述

A Vim text object for ERB blocks.

Ⅱ. 基本信息

创建日期:  2014-05-31
使用用户:  31
Github星:  18
插件作者:  Andrea Leopardi

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# vim-textobj-erb

Build Status

gif-demonstration

Just use iE for changing inside an erb tag, and aE for changing
around it (<% and %> included).

In the gif, I:

  • visually select inside the block with viE
  • change inside another block with ciE
  • delete around a block with daE

E is a mnemonic for an erb block. I didn't use e (lowercase) since there's a
super useful vim-textobj-entire
which targets the entire buffer and uses e as its text object.

This plugin is based on
kana/vim-textobj-user and it
depends on it.

Installation

I can't stop singing the praises of vim-plug as a plugin manager,
but any of them will do.

" vim-plug
Plug 'kana/vim-textobj-user'
Plug 'https://github.com/whatyouhide/vim-textobj-erb'
" NeoBundle
NeoBundle 'kana/vim-textobj-user'
NeoBundle 'https://github.com/whatyouhide/vim-textobj-erb'
" Vundle
Plugin 'kana/vim-textobj-user'
Plugin 'https://github.com/whatyouhide/vim-textobj-erb'

If you use pathogen, just clone the repository.

cd ~/.vim/bundle
git clone https://github.com/kana/vim-textobj-user
git clone https://github.com/whatyouhide/vim-textobj-erb

Contributing

Open an issue if there's something wrong, or submit Pull Requests. I'm more than
happy to get help!

License

© Andrea Leopardi

添加新评论