undo continually vi undo continually vi unix unix

undo continually vi


Repeat the undo, with the . key.


May not work in 3.1 version.

Undo continually things like stack-popping

u . . . 

Suppose you write hello in insert -mode. Go to normal mode, write hallo and go to normal mode. Then type u ., you get hello. Type again . and you will get blank. You can reverse it by typing again u . . so you will get hello hallo. It is very easy to memorize because it works like stacks! I.e. undo repeat the last command repeat the last command where the repeat the last command can be undo. When you press u u, it does mean 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.