reorder.vim


Ⅰ. 插件描述

Reorder the items in natural language lists

Ⅱ. 基本信息

创建日期:  2009-04-02
使用用户:  1
Github星:  1
插件作者:  Ken Bloom

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

Supposing you have a list "foo, bar, and baz" in English where all of the elements are separated by commas and there's the word "and" or "or" before the last item in the list.

The attached Reorder plugin works as follows: Select the list you want to reorder in visual mode (like "foo, bar, and baz") then run :Reorder 3,2,1 (or :'<,'>Reorder 3,2,1 --- the line numbers are ignored for your convenience, since Vim puts them in anyway), and watch Vim reorder your list to "baz, bar, and foo".

Requires Ruby support, and the facets gem installed.

添加新评论