Ⅰ. 插件描述
swap line plugin for vimⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'dougnukem/vim-swap-lines'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'dougnukem/vim-swap-lines'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'dougnukem/vim-swap-lines'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/dougnukem/vim-swap-lines
Ⅳ. 文档说明
Based on the stackoverflow snippet by Mykola Golubyev:
http://stackoverflow.com/questions/741814/move-entire-line-up-and-down-in-vim/741819#741819
Example keymapping you can put in your ~/.vimrc (although the plugin is already configured to map this may not want to force that on people though)
noremap <silent> <c-j> :call <SID>swap_up()<CR>
noremap <silent> <c-k> :call <SID>swap_down()<CR>