vim-vertical-move


Ⅰ. 插件描述

Move 'up' or 'down' without changing the cursor column. Cursor *always* stays in the same column.

Ⅱ. 基本信息

创建日期:  2013-11-17
使用用户:  30
Github星:  88
插件作者:  vim-utils

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/bruno-/vim-vertical-move

Ⅳ. 文档说明

# vim-vertical-move

Build Status

Adds vertical move motions to vim. These move a cursor 'up' or 'down' as many
lines as possible without changing the cursor column. With these motions -
cursor always stays in the same column! These are especially useful in
visual-block mode.

These motions are a bit hard to verbally explain, so be sure to check the
animated examples below.

Motions

  • [v - moves 'up' as many lines as possible without changing the
    cursor column
  • ]v - moves 'down' as many lines as possible. Also doesn't change
    the cursor column

Examples

  • Problem scenario: selecting a block of text with vertical movements with
    vanilla vim (vim-vertical-move not installed). Notice how the **cursor column

position is lost** when using the original paragraph motion }.<br/>
original paragraph motion example

  • Solution using vim-vertical-move: pressing ]v the cursor moves
    'down' as many lines as possible, without changing the cursor column.<br/>

vertical move motion example

Installation

  • Pathogen<br/>
    git clone git://github.com/bruno-/vim-vertical-move.git ~/.vim/bundle/vim-vertical-move
  • Vundle<br/>
    Plugin 'bruno-/vim-vertical-move
  • vim-plug<br/>
    Plug 'bruno-/vim-vertical-move

Contributing and development

Patches are contributions are welcome.

This plugin has a decent vspec test

  1. If your patch is non-trivial, please write tests for it.

For instructions how to run and write tests see :h vertical-move-contributing.

License

MIT

添加新评论