Annotation of 42BSD/usr.lib/learn/editor/L20.01b, revision 1.1.1.1

1.1       root        1: #print
                      2: The undo command actually "undoes" the effects of the
                      3: last command that changed something.
                      4: So, though it is often used to recover deleted lines,
                      5: it can also be used to remove lines you just appended.
                      6: But if you decide that you really did want some lines
                      7: that you appended and then removed with 'u',
                      8: you can always issue another 'u' to get them back.
                      9: The second 'u' undoes the first 'u', and a third 'u' would
                     10: remove them again, etc.  Thus 'u' is its own inverse.
                     11: 
                     12: I will now put you in the editor with 'colors'.  Append the lines
                     13: 
                     14: grey
                     15: violet
                     16: 
                     17: at the end.  Then undo the append once, print the file,
                     18: and then undo the first undo.
                     19: When your're done, rewrite the file, quit, and type 'ready'.
                     20: #create Ref
                     21: red
                     22: yellow
                     23: blue
                     24: green
                     25: purple
                     26: brown
                     27: orange
                     28: grey
                     29: violet
                     30: #create colors
                     31: red
                     32: yellow
                     33: blue
                     34: green
                     35: purple
                     36: brown
                     37: orange
                     38: #copyin
                     39: #pipe
                     40: ex +'set prompt noopt open' colors
                     41: #user
                     42: #unpipe
                     43: #uncopyin
                     44: (diff Ref colors || grep '^u' .copy) > /dev/null
                     45: #log
                     46: #next
                     47: 20.01c 10

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.