repeatable-motions.vim


Ⅰ. 插件描述

Make most motions repeatable

Ⅱ. 基本信息

创建日期:  2014-04-07
使用用户:  2
Github星:  7
插件作者:  Mohammed Chelouti

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/vim-scripts/repeatable-motions.vim

Ⅳ. 文档说明

While the motions f/F and t/T can be repeated with , and ; the default key mapping is not
only unintuitive it also requires the user to remember in what direction s/he moved with the previous f/t motion.

This nuisance brought me to rethink the idea of repeatable motions and resulted
in this plugin.

repeatable-motions.vim makes most default motions repeatable in an easy and
intuitive way. Perform a motion once (such as f) and repeat it simply with
<C-h> to the left and <C-l> to the right. The direction is always what you'd expect, no more remembering if you used f or F.

Additionally repeatable-motions.vim distinguishes between vertical and horizontal

  1. So [M can be repeated with <C-j> and <C-k> while still remembering your
  2. horizontal movement.

Motions that are being repeated behave like normal motions, support counts and can be used in
operation-pending as well as visual-mode.

Everything works out of the box and making your own motion
repeatable is as easy as calling AddRepeatableMotion("<Up>", "<Down>", 1).
Buffer-, expression- and custom mappings are all handled without further ado.

添加新评论