I'm using CLI mergetool vimdiff
and rather than going line by line and typing :diffg RE
for every change to select the REMOTE version, is there a way I can just have the REMOTE version of the entire file as the target merge?
Use :%diffget
to get all chunks.
diffget
takes - as most vim commands - a range. To quote 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.
%
when used as a range is "equal to 1,$ (the entire file)", see :help :%
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With