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

x/denops_std/variable/register.ts>register

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

Register (register or r)

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

export async function main(denops: Denops): Promise<void> {
  // Set register
  await register.set(denops, "a", "world");

  // Get register
  console.log(await register.get(denops, "a"));
}

Note that register.get() returns defaultValue when the register is falsy.