Like this question , I want to keep my cancellation history when I change buffers. However, if I use set hidden, vim no longer asks me when I switch from the buffer with changes.
set hidden
How to save a saved buffer hint but save my cancellation history?
You can use the new function of constant cancellation in Vim 7.3.
set undodir=~/.vim/undodir set undofile
See the documentation in more details.
:help persistent-undo