undo 履歴を削除する

:h clear-undo
When you set 'undolevels' to -1 the undo information is not immediately
cleared, this happens at the next change.  To force clearing the undo
information you can use these commands: >
        :let old_undolevels = &undolevels
        :set undolevels=-1
        :exe "normal a \<BS>\<Esc>"
        :let &undolevels = old_undolevels
        :unlet old_undolevels

Marks for the buffer ('a to 'z) are also saved and restored, together with the
text.  {Vi does this a little bit different}
  • undolevels に -1 をセットする.
  • セットするだけではだめで, 強制的に消去するには変更するような手続きが必要