Skip to main content
Module

x/denops_std/function/mod.ts>undofile

📚 Standard module for denops.vim
Go to Latest
function undofile
import { undofile } from "https://deno.land/x/denops_std@v3.6.0/function/mod.ts";

Return the name of the undo file that would be used for a file with name {name} when writing. This uses the 'undodir' option, finding directories that exist. It does not check if the undo file exists. {name} is always expanded to the full path, since that is what is used internally. If {name} is empty undofile() returns an empty string, since a buffer without a file name will not write an undo file. Useful in combination with |:wundo| and |:rundo|. When compiled without the |+persistent_undo| option this always returns an empty string. Can also be used as a |method|: GetFilename()->undofile()

Parameters

denops: Denops
name: unknown

Returns

Promise<unknown>