Ⅰ. 插件描述
Detect and highlight SCM conflict markers.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/conflictdetection'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/conflictdetection'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/conflictdetection'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/ConflictDetection
Ⅳ. 文档说明
DESCRIPTION
This plugin detects and highlights conflict markers such as <<<<<<<, =======,
and >>>>>>>, which are inserted by source code management systems on merges to
indicate that the automatic resolution failed; this plugin helps you with
becoming aware of and finding them.
RELATED WORKS
To quickly locate and resolve the conflicts, you can use the motions and text
objects provided by the companion ConflictMotions.vim plugin (vimscript
3991).
USAGE
The plugin automatically adds syntax definitions for the conflict markers and
the conflicted lines which are enclosed in the markers. Lines originating from
"our" version are highlighted in a different way than lines from "their"
version, so it's easier for you to visually differentiate the alternatives and
make the right editing choices to resolve the conflict. The "base" version of
the diff3-style syntax is supported, too.
:ConflictSyntax [{syntax}]
Remove / change the syntax (to {syntax}) while keeping
the conflict syntax definitions (:setl syntax=...
would remove them as well). Useful when the filetype's
own syntax interferes with the overlaid conflict
syntax definitions.
The plugin warns you when a buffer that contains conflict markers is edited or
- Cp. g:ConflictDetection_WarnEvents
The detections stores its status in the buffer variable b:conflicted. You can
evaluate this boolean variable in a custom statusline to indicate whether
the buffer contains conflicts.