python_matchit


Ⅰ. 插件描述

Extend the % motion and define g%, [%, and ]% motions for Python files

Ⅱ. 基本信息

创建日期:  2012-09-13
使用用户:  6
Github星:  0
插件作者:  Christopher Lambacher

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

This script redefines the % motion so that (in addition to its usual behavior)
it cycles through if/elif/else, try/except/catch, for/continue/break, and
while/continue/break structures. The script also
defines g% to cycle in the opposite direction. Two other motions, [% and ]%,
go to the start and end of the current block, respectively.

All of these motions should work in Normal, Visual, and Operator-pending

  1. For example, d]% should delete (characterwise) until the end of the
  2. block; v]%d should do the same, going through Visual mode so that

you can see what is being deleted; and V]%d makes it linewise.

添加新评论