This situation, 2 and more people are working on the same file at the same time(please do not need to talk about other solutions, it is clear to everyone that it is better to use local git-repositories).

So, while I changed the code in vim, there were changes in this file, vim offers to download these changes, but if I agree with it, it will erase what I did.Is there a ready-made solution to make the merge of the changes that came with my(how does git do it)?

This situation is of interest.It is not worth proposing solutions for raising a vim server, and editing in real-time, - in this situation it is overkill.Thank you.

1 Answers 1

What prevents to do so:
: w ~/myfile.tmp
: vert diffsplit oldfile

If a visual comparison is not needed, then you can:
: w ~/myfile.tmp
: vsplit oldfile

And then just paste your changes
P.S.No one forbids putting a hotkey or command on it)