5 ms·
I did this yesterday. However IntelliJ had my back. It's History feature has saved my bacon on more than one occasion. One time I was able to go back weeks to
by w4tson 10y ago
I did this yesterday. However IntelliJ had my back. It's History feature has saved my bacon on more than one occasion.
One time I was able to go back weeks to fetch some code I'd long since deleted and was nowhere to be found in git.
- mintplant 10y agoI have this in my .vimrc which serves a similar purpose: " persist undo history to file / across sessions set undofile set undodir=$HOME/.vimundo " max out history length set history=9999 set undoleves=9999999999 set undoreload=10000 (Don't forget to mkdir "$HOME/.vimundo".) Combine that with https://github.com/mbbill/undotree https://github.com/mbbill/undotree and you can easily walk the entire history of every file you edit.
- calpaterson 10y agoThe equivalent emacs code is here: https://www.emacswiki.org/emacs/BackupDirectory https://www.emacswiki.org/emacs/BackupDirectory
- semi-extrinsic 10y agoThat undotree plugin looks sweet! Do I understand correctly that if I do N undos, then fat-finger an edit instead of a yank, I can still get back to where I was before the N undos? This would solve my only big gripe with vim's undo. (Well, the other big gripe is that when I'm forced to use a program with crippled undo, e.g. any Microsoft product ever, I'm frustrated up the wall. The worst-in-class award goes to Word with Endnote, where many Endnote commands wipe your entire undo history. How people can use that on a permanent basis is beyond me.)
- akx 10y agoIs it actually `undoleves` or is that a typo?
- mintplant 10y agoThat should be `undolevels`, yes. Unfortunately I can't edit it now.