Skip to main content
Module

x/denops_std/option/mod.ts>swapfile

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

Use a swapfile for the buffer. This option can be reset when a swapfile is not wanted for a specific buffer. For example, with confidential information that even root must not be able to access. Careful: All text will be in memory: - Don't use this for big files. - Recovery will be impossible! A swapfile will only be present when 'updatecount' is non-zero and 'swapfile' is set. When 'swapfile' is reset, the swap file for the current buffer is immediately deleted. When 'swapfile' is set, and 'updatecount' is non-zero, a swap file is immediately created. Also see swap-file and 'swapsync'. If you want to open a new buffer without creating a swap file for it, use the :noswapfile modifier. See 'directory' for where the swap file is created.

This option is used together with 'bufhidden' and 'buftype' to specify special kinds of buffers. See special-buffers.

(default on)

type

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