Ⅰ. 插件描述
Movement over diff hunks with ]] etc.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/diff-movement'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/diff-movement'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/diff-movement'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/diff_movement
Ⅳ. 文档说明
DESCRIPTION
This filetype plugin provides movement commands and text objects for diff hunks.
Supports traditional, context and unified diff formats.
RELATED WORKS
- textobj-gitgutter (vimscript #4458) provides an inner-hunk text object for
hunks provided by the vim-gitgutter plugin. It also requires textobj-user.
USAGE
Move around diff hunks:
]] Go to [count] next start of a diff hunk.
][ Go to [count] next end of a diff hunk.
[[ Go to [count] previous start of a diff hunk.
[] Go to [count] previous end of a diff hunk.
ih "inner hunk" text object, select [count] hunk contents.
ah "a hunk" text object, select [count] hunks, including
the header.