Reputation: 4928
Here's a sequence of events:
vim
, make some edits, save it, and stay in normal mode;git
;vim
, enter insert mode (at this point file has been changed, but vim
sees a stale version);vim
.When I do things like above, what typically happens is that vim
warns me at step 5:
WARNING: The file has been changed since reading it!!!
Do you really want to write to it (y/n)?
This is rather inconvenient, because I already made some "valuable" edits. How can I ask vim
to do the check at step 3, that is, before entering insert mode, check if the buffer is outdated and offer to reload?
Upvotes: 2
Views: 222