Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Not in this case. If you accidentally `:w! thesis.txt`, persistent undo isn't going to help you.


Clipboard manager. Set to record X selections too. That does it for me. Every bit of text I select is copied to clipboard, just below the value currently held there. In this case I'd have the full content of the docx file as a second item in my clipboard manager list with an email as a first one. I set the size of the clipboard items list to 500, just in case.

I couldn't live without some kind of clipboard manager. It was Ditto on Windows and klipper now on Linux. Dunno about Mac OS, but I bet there is something with similar functionality. It adds another layer of protection to Ctrl-Z everywhere and undo-tree-mode in Emacs. As a programmer I deal with text all the time and I need to be able to recover as much as possible if I make a mistake and this (clipboard manager + undo-tree + version control + normal undo) is the most robust system I could find.


Re: OS X clipboard/pasteboard manager.

I've used ClipMenu [1] for years after using Jumpcut [2] as far back as 2003.

[1: http://www.clipmenu.com ] [2: http://jumpcut.sourceforge.net ]


I actually have some scripts which take textual snapshots of all my open non-idle terminal windows every 10 seconds.

This has saved my butt a number of times.


For this purpose I set very large history in tmux and I almost never use terminal outside tmux anyway. The panes and windows in my tmux are very long-lived, but when I decide to close one I need to go through it's history and manually extract interesting/important bits. It's annoying and automating this would be really nice though.


Seems to me that a clipboard manager as a solution is indicative of how this type of a problem comes up in the first place...


Works for me. Across multiple vim sessions. Unless, you mean a new file thesis.txt, in which case the old file is untouched.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: