Skip to main content
Deno 2 is finally here ๐ŸŽ‰๏ธ
Learn more
Module

x/denops_std/variable/variable.ts>buffers

๐Ÿ“š Standard module for denops.vim
Go to Latest
variable buffers
import { buffers } from "https://deno.land/x/denops_std@v5.0.2/variable/variable.ts";

Buffer local variables (buffers or b)

import { Denops } from "../mod.ts";
import { buffers } from "../variable/mod.ts";

export async function main(denops: Denops): Promise<void> {
  // Set buffer variable
  await buffers.set(denops, "hello", "world");

  // Get buffer variable
  console.log(await buffers.get(denops, "hello"));

  // Remove buffer variable
  await buffers.remove(denops, "hello");
}