Add 'set hidden' to vimrc.