使用:%diffget得到所有块。
diffget需要 - 就像大多数 vim 命令一样 - 一个范围。引用 vimhelp:
:diffg :diffget
:[range]diffg[et] [bufspec]
Modify the current buffer to undo difference with another
buffer. [...]
See below for [range].
[...]
When no [range] is given, the diff at the cursor position or just above it is
affected. When [range] is used, Vim tries to only put or get the specified
lines.
Run Code Online (Sandbox Code Playgroud)
%当用作范围“等于 1,$(整个文件)”时,请参阅:help :%.