May not work in version 3.1.
Discard anything, e.g. drop the stack
u . . .
Suppose you write hello in insert -mode. Go to normal mode, write hallo and go to normal mode. Then enter u . you get hello . Enter again . and you will get empty. You can change it by typing u . . again u . . u . . to get hello hallo . It is very easy to remember, because it works like stacks! That is, undo repeat the last command repeat the last command , where repeating the last command may be undo . When you press uu , it means undo the last command : undo last command , and the second u means undo the last command and in this case it is u .
Tested with Nvi Version 1.79 (10/23/96) The CSRG, University of California, Berkeley , OpenBSD. You can get the source here .
source share