A usable VIM Undo tree ################################## :date: 2014-04-15 14:20 :tags: vim, undo As some may have heard, vim stores your actions (and undos) as a tree, which is great. With vim 7.3 there is even a option to persist these changes between session. But with vanilla vim this tree is pretty much unusable. A friend showed me a great plugin which gives vim git-like super powers by showing undos in a tree, together with a patch view with the `gundo plugin `_. This plugin, together with persistent undo files feels almost like when i have used ctrl-r for the shell the first time! Configuration ------------- Grab vundle for VIM, `install it `_. Add these lines to your vimrc: .. code-block:: vim Bundle 'sjl/gundo.vim' nnoremap :GundoToggle set undodir=~/.vim/undo set undofile "maximum number of changes that can be undone set undolevels=1000000 "maximum number lines to save for undo on a buffer reload set undoreload=10000000 In vim run **:BundleInstall** , you can now toggle the undo bar with ****.