Skip to main content
Module

x/denops_std/option/mod.ts>undolevels

📚 Standard module for denops.vim
Go to Latest
variable undolevels
import { undolevels } from "https://deno.land/x/denops_std@v6.4.0/option/mod.ts";

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 already use a large 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 -1 for no undo at all. You might want to do this only for the current buffer:

setlocal ul=-1

This helps when you run out of memory for a single change.

The local value is set to -123456 when the global value is to be used.

Also see clear-undo.

(default 100, 1000 for Unix, VMS and Win32)