Hacker News new | ask | show | jobs
by wolverine876 922 days ago
I can't believe that, in 16 minutes, nobody else on HN had the answer: nvi is following original, authentic vi behavior, not this newfangled stuff. The Vim manual explains it:

  How undo and redo commands work depends on the 'u' flag in 'cpoptions'.
  There is the Vim way ('u' excluded) and the Vi-compatible way ('u' included).
  In the Vim way, "uu" undoes two changes.  In the Vi-compatible way, "uu" does
  nothing (undoes an undo).

  'u' excluded, the Vim way:
  You can go back in time with the undo command.  You can then go forward again
  with the redo command.  If you make a new change after the undo command,
  the redo will not be possible anymore.

  'u' included, the Vi-compatible way:
  The undo command undoes the previous change, and also the previous undo
  command.  The redo command repeats the previous undo command.  It does NOT
  repeat a change command, use "." for that.
https://vimhelp.org/undo.txt.html

(Actually, I have so rarely used vi that I'm relying on the implications of the Vim manual that it's original vi behavior.)