move


Ⅰ. 插件描述

Plugin to move lines and selections up and down

Ⅱ. 基本信息

创建日期:  2013-08-09
使用用户:  638
Github星:  590
插件作者:  Matthias Vogelgesang

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# move

It's annoying to delete and paste parts of a text just to move it up/down or
left/right a bit.
There is the :m[ove] command but it is quite awkward to use by todays

  1. vim-move is a Vim plugin that moves lines and selections in a more
    1. Out of the box, the following keys are mapped in visual and

normal mode:

<A-k>   Move current line/selection up
<A-j>   Move current line/selection down
<A-h>   Move current character/selection left
<A-l>   Move current character/selection right

The mappings can be prefixed with a count, e.g. 5<A-k> will move the selection
up by 5 lines.

See this short demo for a first impression:

vim-vertical-move demo

vim-horizontal-move_demo

Installation

vim-move is compatible with all major plugin managers. To install it using
Vundle, add

Bundle 'matze/vim-move'

to your .vimrc.

Customization

Use g:move_key_modifier to set a custom modifier for key bindings. For
example,

let g:move_key_modifier = 'C'

which will create the following key bindings:

<C-k>   Move current line/selections up
<C-j>   Move current line/selections down

And so on...

License

This plugin is licensed under MIT license.

添加新评论