Skip to main content
Module

x/denops_std/buffer/mod.ts>reload

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

Reload the content of the bufnr buffer

import { Denops } from "../mod.ts";
import * as fn from "../function/mod.ts";
import { open, reload } from "../buffer/mod.ts";

export async function main(denops: Denops): Promise<void> {
  await open(denops, "README.md");
  const bufnr = (await fn.bufnr(denops)) as number;
  // ...
  // Reload the content of the `bufnr` buffer.
  await reload(denops, bufnr);
}

It may temporary change a current buffer or a current window to properly reload the content of the bufnr buffer.

Parameters

denops: Denops
bufnr: number

Returns

Promise<void>