tags:

views:

100

answers:

1

If I'm working in a file, change to another buffer, and then change back, I have lost my undo history.

  1. File1.txt - make a bunch of changes & save.
  2. Open new buffer - :e test.txt
  3. Switch back to File1.txt - :b#
  4. Undo history is gone.

Any work arounds for this?

+2  A: 

You could :set hidden. This means that the buffer of the old file will only be hidden when you switch to the new file. When you switch back, you still have your undo history.

Rüdiger Hanke