vim-textobj-postexpr


Ⅰ. 插件描述

Ⅱ. 基本信息

创建日期:  2014-02-27
使用用户:  1
Github星:  1
插件作者:  syngan

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

vim-textobj-postexpr

Build Status

Required:

mapping:

  • <Plug>(textobj-postexpr-a)
  • <Plug>(textobj-postexpr-i)

Examples

  • omap av <Plug>(textobj-postexpr-a)
  • omap iv <Plug>(textobj-postexpr-i)

Let █ be the position of the cursor.

tako()
ho█ge[aa[bb](1, 2, 3)]()
(1)foo

if do div then

tako()
█
(1)foo

if do dav then

tako()
█foo

When

tako()
hoge[a█a[bb](1, 2, 3)]()
(1)foo

if do div then

tako()
hoge[█]()
(1)foo

if do dav then

tako()
hoge[█]()
(1)foo

Customize

for LaTeX

g:textobj_postexpr.tex = {
\    'keyword_expr' : '\\\k\+',
\    'block' : {'{' : '}', '[' : ']'}
\}

Blog in Japanese

添加新评论