Let me pose the question this way. I open a new file in vim, (version 1)
#include<stdio.h>
main()
{
...blah
}
and then use <Esc>:w<Enter>
to write the file. Then made changes (version 2)
#include<stdio.h>
main()
{
...blah
... edit1
... edit2 //and large number of changes here and there in code
}
then I save changes using <Esc>:w<Enter>
.
Is there a way to undo changes to version 1 directly (Since it was a last save) i.e., without constantly pressing u
for undo
ing
git svn
which lets you use git locally and svn remotely.