Dê uma olhada em :h undolevels . Configure-o para um número realmente grande.
Copiado abaixo por conveniência.
'undolevels' 'ul'
'undolevels' 'ul' number (default 100, 1000 for Unix, VMS,
Win32 and OS/2)
global
{not in Vi}
Maximum number of changes that can be undone. Since undo information
is kept in memory, higher numbers will cause more memory to be used
(nevertheless, a single change can use an unlimited amount of memory).
Set to 0 for Vi compatibility: One level of undo and "u" undoes
itself:
set ul=0
But you can also get Vi compatibility by including the 'u' flag in
'cpoptions', and still be able to use CTRL-R to repeat undo.
Also see undo-two-ways.
Set to a negative number for no undo at all:
set ul=-1
This helps when you run out of memory for a single change.
Also see clear-undo.