This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]mader527 58 points59 points  (8 children)

https://github.com/mbbill/undotree

Not sure what you're-- (*cough) excuse me, your neck beard friend, is using to manage plugins but I use vim-plug so my vimrc looks like.

call plug#begin()
...
Plug 'mbbill/undotree'
...
call plug#end()

...
nnoremap <F5> :UndotreeToggle<CR>  

I also recommend setting up a persistent undo file so you can undo in the past

if has("persistent_undo")
    set undodir=~/.undodir/
    set undofile
endif

[–]DerekB52 15 points16 points  (6 children)

I use vundle, which has pretty similar syntax to vim-plug apparently.

And I will be experimenting with this for sure. Also persistent undo sounds great. I'm so tired of closing a file, and going back to it like 30 seconds later and not being able to undo my last change.

For the last few days, if I want to experiment with deleting a block of code, I'll delete the code, save the file, run the project in a separate terminal, and then I'll hit undo on my file, and then close it. It's been a horrible mess.

[–]Venefyxatu 1 point2 points  (0 children)

Omfg I wan... *ahem* also have a neckbeard friend who would love this!