Regaining previous typed text

Sometimes I accidentally delete typed text or make a mistake with the copy-paste buttons. As a result I lose text that I didn’t want to lose. There doesn’t seem to be a ‘return’ button in Scrivener where I can retract in my actions until I am back at the point before I lost the text.

On the Mac it is (i think…mac not handy to check and i use muscle memory) Cmd-z. it is macOSX feature.

2 Likes

Automatically? That is not really the sort of problem software can handle on its own. It wouldn’t have a way of comprehending what is meant by the actions you take. The primary problem being: you say you want to return to before the damaging edit, but how do we define a damaging edit? Some point prior to where you deleted something, or further back, prior to where you wrote it? To coldly logical software, both events are equally valid and of equal potential significance. It couldn’t weight one event over the other—deleting text is something writers do almost as much as they do typing text, it’s an important and constant part of the job. And sometimes typing in stuff isn’t intentional—as you say, sometimes you accidentally paste. Both deleting and typing can have positive and negative interpretations. It takes a human a mind to point out which is which, and often that will mean specifically yours, since even another person probably couldn’t with perfect accuracy look at a list of your edits and judge which are accidental and which are intentional!

There is of course a tool in most software that treats all edits equally—and that is the Undo/Redo system. I’m sure you are well aware of all that though, and are speaking of times where that is no longer available.

Snapshots

So for that, there is indeed a tool in Scrivener that allows “long range” return to different points of time in a chunk of text’s history. Looking at this feature in the project I have open right now, I can browse through the condition of this text item going back to 2016. Here’s a quick tutorial:

  1. Use the Navigate ▸ Inspect ▸ Snapshots menu command. The inspector sidebar on the right will open and switch to the Snapshots pane. It will likely be empty, so not terribly interesting looking just yet.
  2. Press Ctrl+5 / ⌘5, or if you prefer the mouse, click the little + button in the header bar area of the snapshots inspector pane. If your speakers are on, you’ll hear a camera shutter click, and a date-stamped entry will be added to the list below.
  3. Double-click on the title of it to optionally give it a more meaningful name (you can also do this up front, with the shortcut for the Documents ▸ Snapshot ▸ Take Snapshot with Title command). In doing so you’ll also select it, and as you’ll see the current state of your text is shown in the preview area below.
  4. Try editing the text in the preview area. No can do! This is a locked state of your text, impossible to edit, impossible to accidentally damage or load up in a search result and think you’re looking at copy A instead of copy B. It will stay this way for all time. The only thing you can do about it is delete it.

How do we return the text to the state represented by a snapshot? That’s what the Roll back button is for—but we can also just copy and paste bits of text from the preview area back into the editor.

So that is your mechanism. The main question will be what way of using this will work best with your habits. Myself, when I start editing or working on a section of text I have a habit formed of hitting Ctrl+5 to take a snapshot. Others might find it easier to remember if they “rewire” their habit to save to taking a snapshot. Whenever you feel like saving—what is ordinarily somewhat of a placebo in an auto-saving program like Scrivener—press the ‘5’ key instead of the ‘S’ key along with the modifier.

And for those there is even an option that compliments that way of working, in the General: Saving panel, set Take snapshots of changed text documents on manual save. With that, you can unburden yourself with having to remember to take snapshots. Whenever you save the project with File ▸ Save, the software will go through and detect every little chunk of text that has changed since the last save, and take a snapshot of its current condition. Thus, used habitually, all binder items acquire a roadmap of edits over time. Of course a semi-automatic approach like that is less personal. In our first example we even gave the snapshot a name to help us know which editing task it relates to. If we leave it up to the software we’ll just get generic “Untitled (Save)” snapshots, and have to do a little more poking around to find the state of the text we’re looking for. But if you have trouble remembering to take snapshots—that’s an acceptable trade-off.

So ultimately that strikes the best balance in this quandary we started out with. For the part that software has a hard time doing, it uses your understanding of what constitutes a significant edit. To that end, Snapshots gives you the mechanism to return to your text in previous states, while making it super easy to create these states. There is no having to muck around with “Save As” copies and wade through a bunch of easy to damage or confuse “copies”. They are neat, tidy, sorted by date and tucked away out of sight until you need them.

3 Likes

Thank you, I am aware of this option. But isn’t there a faster option than having to make snapshots of all the text I write, as opposed to just returning to where I was 30 seconds ago?

Wouldn’t such a short time span return be adequately addressed by Undo?

I may not have understood the problem but if it is simply a question of returning to where you were a few edits ago then I think the suggestion of using Cmd-Z repeatedly until you reach the point where you accidentally deleted the text should be enough.

@AmberV’s suggestion is very good practice for more complex situations (after a lot more editing) or where you want to preserve intermediate steps, for example, but in case of accidental pasting and a few edits which don’t matter then rolling back with Cmd-Z should be enough. I hope this works for you.

1 Like

Amber, a question on the manual saves. I assume this option DOES NOT apply to the Back up to and now commands, though essentially that is a manual save and would be a wonderful feature to have. On the suggestion above on the undo command. In Photoshop you can use the undo command a large number of times to track back on incremental changes, do you know how many times the undo command will step backward in Scrivener and does that backward undo capability (history) disappear when do save by any mechanism. Ie does saving set undo back to zero???

No, the software gives you the choice on whether you want all of these things to trigger at the same time or not. The described feature only creates snapshots with File ▸ Save or the shortcut. If you want to back up and take snapshots, then also enable Back up with each manual save, in the Backup settings area. This is the setup I use. Saving for me is a way of putting in stone the work I’ve done thus far that session, at the item level and the whole project via backups.

As to the other two questions:

  • I have no idea how much history it retains, but it’s a lot—and it’s good to know it’s per editing field as well. You can undo a mistake made half an hour ago in the Document Notes area, while having spent a while writing in the main text area, or come back to an item you edited hours ago and undo stuff within it, without having to unravel everything done since then. Another good reason to keep text chunks as small as reasonable!
  • No, only closing the project clears undo to the best of my knowledge. It’s worth being aware that syncing mobile changes counts as a reload, if you happened to have left the project open while editing on the iOS version.

Thanks Amber for the explanation

Just to clarify your above comment, if you enable Backup with each manual save does that also save a snapshot of any text file that has changed like the File Save option does?

You need this option to be checked too :

Personally, since I don’t necessarily want a backup each time I decide that it is justified to take a snapshot of all modified documents, my setup is that I have the above option checked, and I rather do my backups using the “backup now” button from the toolbar.
image

In a way, you could then say that using that setup, the “S” of Ctrl+S stands more for “Snapshot” than for “Save”…
Especially since my project is already auto-saved after 5 seconds of inactivity anyways.
What I mean here is that every time I hit Ctrl+S, I’m thinking “snapshot”. Not “save”.

1 Like

Yes I saw that, the questions is File>Save is a manual save, but are the options of Back up now and Back up too also considered manual save options for this purpose as well was my question.

They are not.
To get both a snapshot of modified documents since last manual save and a backup of the project, you need to have both options checked, and save the project using Ctrl+S or the menu command.

Again to be clear both back up to and back up now are catagorized as manual save functions for issues of saving snapshots of interval changes in the text files.

Where ?
In the manual ?

No , do they both function like a manual saves as far as snapshots

They don’t.
They trigger a save (it would be somewhat pointless to backup a project without saving the changes made to it first), but they don’t trigger a snapshot, even with the option to take a snapshot […] on manual save checked.
. . . . . .

Still no answer to my original question (most of you lost me after the 1st sentecnce):
Sometimes I accidentally delete typed text or make a mistake with the copy-paste buttons. As a result I lose text that I didn’t want to lose. There doesn’t seem to be a ‘return’ button in Scrivener where I can retract in my actions until I am back at the point before I lost the text.

Press CMD-Z on Mac or CTRL-Z on Windows to Undo recent edits. That’s the answer to your question.

Best,
Jim

1 Like

Thank you Jim.
That was very useful.
regards,
Bernadette