I'm trying to learn to use vimdiff well. Currently I figured out how to get a block of diff from a buffer to another (using do
) but what I'm willing to do now is to simply get one (or some) line of a block in the other buffer.
The vimdiff
documentation says:
:[range]diffget
but I can't figure how to have a correct range parameter to simply copy the line I'm on from a buffer to the other.
You can use
:.,.
as range from current line to the current line.
According to the doc you can omit range and then current line or line above will be used.
I find it a bit easier to select the current line with V and then to do or dp. This has the same effect as selecting the rage with :.,. but it is easier to type! Also, you can easily add adjacent lines with j or k.
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