Skip to main content
Module

x/denops_std/buffer/mod.ts>reload

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

Reload the content of the bufnr buffer

import type { Entrypoint } from "https://deno.land/x/denops_std@v6.5.1/mod.ts";
import * as fn from "https://deno.land/x/denops_std@v6.5.1/function/mod.ts";
import { open, reload } from "https://deno.land/x/denops_std@v6.5.1/buffer/mod.ts";

export const main: Entrypoint = async (denops) => {
  await open(denops, "README.md");
  const bufnr = await fn.bufnr(denops);
  // ...
  // 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>