Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ddc_vim/deps.ts>fn.undofile

Dark deno-powered completion framework for neovim/Vim
Go to Latest
function fn.undofile
import { fn } from "https://deno.land/x/ddc_vim@v4.0.2/deps.ts";
const { undofile } = fn;

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<string>