U
U
unclechu2014-04-04 11:00:29
vim
unclechu, 2014-04-04 11:00:29

Vim: when changing a file, how to load changes without overwriting existing ones in the process (that is, gluing both changes in vim)?

Such a situation, 2 or more people are working on the same file at the same time (please do not talk about other solutions, everyone understands that it is better to use local git repositories).
So, while I was changing the code in vim, there were changes in this file, vim offers to load these changes, but if I agree with him, he will overwrite what I did. Is there a solution to merge incoming changes with mine (like git does)?
Interested in this situation. You should not offer solutions for raising the vim server, and editing in real time - in this situation - this is an overkill. Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Valentine, 2014-04-04
@vvpoloskin

What prevents you from doing this:
:w ~/myfile.tmp
:vert diffsplit oldfile
If visual comparison is not needed, then you can do this: :
w ~/myfile.tmp
:vsplit
oldfile
keys or command)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question