Skip to main content
Module

x/denops_std/function/buffer.ts>bufload

📚 Standard module for denops.vim
Go to Latest
function bufload
import { bufload } from "https://deno.land/x/denops_std@v4.1.4/function/buffer.ts";

Ensure the buffer {buf} is loaded. When the buffer name refers to an existing file then the file is read. Otherwise the buffer will be empty. If the buffer was already loaded then there is no change. If the buffer is not related to a file the no file is read (e.g., when 'buftype' is "nofile"). If there is an existing swap file for the file of the buffer, there will be no dialog, the buffer will be loaded anyway. The {buf} argument is used like with |bufexists()|.

Can also be used as a |method|: eval 'somename'->bufload()

Parameters

denops: Denops
buf: string | number

Returns

Promise<void>