Lugaru's Epsilon
Editor 14.04

Epsilon User's Manual and Reference
   Commands by Topic
      . . .
      More Programming Features
         Navigating in Source Code
         Pulling Words
         Accessing Help
         Context-Sensitive Help
         Commenting Commands
      Fixing Mistakes
         Interrupting a Command
      The Screen
         Display Commands
         Horizontal Scrolling
         . . .
         The Bell
      . . .

Previous   Up    Next
Commenting Commands  Commands by Topic   Interrupting a Command

Epsilon User's Manual and Reference > Commands by Topic > Fixing Mistakes >


The undo command on F9 undoes the last command, restoring the previous contents of the buffer, or moving point to its position, as if you hadn't done the last command. If you press F9 again, Epsilon will undo the command before that, and so forth.

For convenience, when typing text Epsilon treats each word you type as a single command, rather than treating each character as its own command. For example, if you typed the previous paragraph and pressed undo, Epsilon would remove the text "forth.". If you pressed undo again, Epsilon would remove "so ".

Epsilon's undo mechanism considers each subcommand of a complicated command such as query-replace a separate command. For example, suppose you do a query-replace, and one-by-one replace ten occurrences of a string. The undo command would then reverse the replacements one at a time.

Epsilon remembers changes to each buffer separately. Say you changed buffer 1, then changed buffer 2, then returned to buffer 1. Undoing now would undo the last change you made to buffer 1, leaving buffer 2 alone. If you switched to buffer 2 and invoked undo, Epsilon would then undo changes to that buffer.

The redo command on F10 puts your changes back in (it undoes the last undo). If you press undo five times, then press redo four times, the buffer would appear the same as if you pressed undo only once.

You can move back and forth undoing and redoing in this way. However, if you invoke a command (other than undo or redo) that either changes the buffer or moves point, you can not redo any commands undone immediately before that command. For example, if you type "one two three", undo the "three", and type "four" instead, Epsilon will behave as if you had typed "one two four" all along, and will let you undo only that.

The commands undo-changes and redo-changes work like undo and redo, except they will automatically undo or redo all changes to the buffer that involve only movements of point, and stop just before a change of actual buffer contents.

For example, when you invoke undo-changes, it performs an undo, then continues to undo changes that involve only movements of point. The undo-changes command will either undo a single buffer modification (as opposed to movement of point), as a plain undo command would, or a whole series of movement commands at once. It doesn't undo any movement commands after undoing a buffer modification, only after undoing other movement commands. The redo-changes command works similarly.

The Ctrl-F9 key runs undo-changes, and the Ctrl-F10 key runs redo-changes.

The commands undo-by-commands and redo-by-commands are another alternative; they try to group undo operations on a command-by-command basis.

Use the undo-movements command on Ctrl-F11 to move to the location of previous editing operations. It uses the same undo information, but without making any changes to the buffer. The redo-movements command on Ctrl-F12 goes in the opposite direction, toward more recent editing locations.

The buffer-specific variable undo-size determines, in part, how many commands Epsilon can remember. For example, if undo-size has the value 500,000 (the default), Epsilon will save at most 500,000 characters of deleted or changed text for each buffer. Each buffer may have its own value for this variable. Epsilon also places an internal limit on the number of commands, related to command complexity. Epsilon can typically remember about 10,000 simple commands (ignoring any limit imposed by undo-size) but more complicated commands make the number smaller.

Standard bindings:

  F9, Ctrl-x u  undo
 F10, Ctrl-x r  redo
 Ctrl-F9, Ctrl-x Ctrl-u  undo-changes
 Ctrl-F10, Ctrl-x Ctrl-r  redo-changes
 Ctrl-F11  undo-movements
 Ctrl-F12  redo-movements

Previous   Up    Next
Commenting Commands  Commands by Topic   Interrupting a Command

Lugaru Epsilon Programmer's Editor 14.04 manual. Copyright (C) 1984, 2021 by Lugaru Software Ltd. All rights reserved.