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@v4.1.3/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.

type

{ get(denops: Denops): Promise<number>; set(denops: Denops, value: number): Promise<void>; reset(denops: Denops): Promise<void>; getGlobal(denops: Denops): Promise<number>; setGlobal(denops: Denops, value: number): Promise<void>; resetGlobal(denops: Denops): Promise<void>; getLocal(denops: Denops): Promise<number>; setLocal(denops: Denops, value: number): Promise<void>; resetLocal(denops: Denops): Promise<void>; }