2.11BSD/src/share/learn/editor/L20.01b

#print
The undo command actually "undoes" the effects of the
last command that changed something.
So, though it is often used to recover deleted lines,
it can also be used to remove lines you just appended.
But if you decide that you really did want some lines
that you appended and then removed with 'u',
you can always issue another 'u' to get them back.
The second 'u' undoes the first 'u', and a third 'u' would
remove them again, etc.  Thus 'u' is its own inverse.

I will now put you in the editor with 'colors'.  Append the lines

grey
violet

at the end.  Then undo the append once, print the file,
and then undo the first undo.
When you're done, rewrite the file, quit, and type 'ready'.
#create Ref
red
yellow
blue
green
purple
brown
orange
grey
violet
#create colors
red
yellow
blue
green
purple
brown
orange
#copyin
#pipe
ex +'set prompt noopt open' colors
#user
#unpipe
#uncopyin
(diff Ref colors || grep '^u' .copy) > /dev/null
#log
#next
20.01c 10