Ⅰ. 插件描述
reverse (1st line becomes last ...) the lines in a fileⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/reverse-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/reverse-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/reverse-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/reverse.vim
Ⅳ. 文档说明
This file has a vim script to reverse the lines in the file.
(line 1 swapped with last line say 5, line 2 swapped with line4 ...)
I build it because I had such a requirement and could not
think of anything quicker on Windows.
Unix people have lot better tricks-).
How to use :
Method 1: press <F2> if you wanna reverse all the lines
Method 2: select lines in visual mode and press <F2>
if you wanna swap only the highlighted lines
Method 3: To reverse line1 to line2 use :line1,line2 Reverse