Beginning Linux user: “Ctrl-Z is undo, right?”

Advanced Linux user: “Ctrl-Z dammit fg”

  • tal@lemmy.today
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    1 year ago

    Emacs’s undo-tree – which I mentioned above that I use – also provides non-destructive undo, same as emacs’s base undo. So you can’t lose data by undoing things. However, it also uses the undo and redo semantics to traverse one branch of the tree, so it works like most other apps as long as you aren’t needing to recover data that would normally have been “lost” by performing an undo.

    There are probably faster ways to do it, but since I rarely need to quickly grab stuff that an undo destroyed, I haven’t looked into them.

    1. Do non-undo operation.

    2. Undo it.

    3. Do non-undo operation. At this point, in software packages that lack non-destructive undo, you will have lost the data in #1.

    4. Run undo-tree-visualize, on C-x u by default. A new window will come up displaying the undo history as a tree.

    5. You can traverse around the tree. Move to the node immediately before the branch that you abandoned, and use C-b and C-f to switch between branches.