Wondering if (perhaps via the console in Sublime?) it is possible to recover from a multi-line undo, followed by typing something (a paste, in my case)?

IOW, I un"did" a bunch of stuff, meant to just look at it and re-do it all, but instead I pasted. Any way to recover all my prior work? (I have looked on the file system, via another terminal window, and it's not there. I have not saved, and I haven't exited Sublime yet.)

I'm aware this generally is not possible, but thought perhaps there is some other type of history kept by Sublime that might make it possible via its Python console.

  • 2
    It seems like this is not possible (though I'm still open to someone answering this, if possible!) There is a plugin called Local History, which might save me from future grief (there's also another plugin called Automatic Backup, which is similar) and I've installed it. Here is my post on the Sublime Text forum which contains links to Local History and to some UserVoice feature requests for Sublime that would help for users in this situation too (feel free to upvote them on UserVoice if you're so inclined!) --> sublimetext.com/forum/viewtopic.php?f=3&t=9074 – likethesky Sep 4 '12 at 18:58
  • Somewhat related, if you are on MacOSX check out ClipMenu, it is clipboard history. Of course it wouldn't have saved you in your current situation but I've found it useful in plenty of other scenarios where the text you once copied is no longer in a document and I don't feel like undoing. – Dan R Sep 7 '12 at 14:32

There is a plugin Sublundo that will handle this. Instead of discarding the whole history in case of such a mishap it will just create a new branch in the undo tree. You can select your old branch in the history view.

Beware though, the plugin is in early development and should be used with caution. ;-)

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.